|
David, Thanks for the response. I created a JSP from the sample code you sent me, When I run the JSP I get the same error I descibed previously: Error 500 An error has occured while processing request:http://localhost:8080/StrutsTest.jsp Message: "Directive: Invalid attribute, prefix" Target Servlet: jsp StackTrace: ---------------------------------------------------------------------------- ---- Root Error-1: "Directive: Invalid attribute, prefix" com.ibm.servlet.engine.webapp.WebAppErrorReport: "Directive: Invalid attribute, prefix" I completed a tutorial VisualAge for Java for Websphere by Craig Pelkie a few months ago. In that tutorial, one of the exercises was to create a JSP using the Websphere custom tags. It used tags for iteration and for JDBC connections. In that example, it used the prefix tsx for the custom tags but there was no directive statement to define the tag library. I assume because these were the websphere custom tags and no directive statement was needed. The application worked fine. Does this imply that the only custom tags that can be used for Websphere 3.5.3 are in the Websphere tag library? Steve -----Original Message----- From: David Morris [mailto:David.Morris@plumcreek.com] Sent: Monday, June 17, 2002 2:26 PM To: java400-l@midrange.com Subject: Re: Using Custom JSP tags in WebSphere 3.5.3 Stephen, Does WebSphere 3.5.3 support JSP 1.1? I think it may only support the 1.0 specification. I use Struts quite a bit but use Tomcat. You can see if it is your bean or the tablib support by doing using one of the struts tags. Try something like: <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="logic" %> <html:html locale="true"> <head> <title>Test</title> </head> <body> <logic:notPresent name="org.apache.struts.action.MESSAGE" scope="application"> <font color="red"> ERROR: Application resources not loaded -- check servlet container logs for error messages. </font> </logic:notPresent> </body> </html:html> This should compile and work/fail depending on whether you have an ApplicationResources class set up. David Morris >>> Gibson.Stephen@burlington.com 06/17/02 10:12AM >>> I am using Websphere 3.5.3. I have created an application that returns a collection of Order History beans. I am trying to use a JSP to display this collection using the Struts custom tag library Struts-Logic. Here is the JSP source: <!-- InvoiceList.jsp --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <%@ page language="java" contentType="text/html" %> <%@ page import="com.leescarpet.claimautomation.OrderHistoryBean" %> <%@ taglib uri="/Web-inf/struts-logic.tld" prefix="logic" %> <%@ taglib uri="/Web-inf/struts-html.tld" prefix="html" %> <html:html> <HEAD> <META name="GENERATOR" content="IBM WebSphere Page Designer V3.5.3 for Windows"> <META http-equiv="Content-Style-Type" content="text/css"> <TITLE> Invoice Selection </TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> <P> <H1>Select the invoice for the customer filing the claim</H1> <TABLE> <TBODY> </TBODY> </TABLE> <FORM> <TABLE> <TBODY> <TR bgcolor="lightblue"> <TH width="125">Invoice Number</TH> <TH width="89">Invoice Date</TH> <TH width="185">Customer</TH> <TH width="148">Acknowledgement Number</TH> <TH width="114">Acknowledgement Date</TH> </TR> <% //************************************************************************** ************ // Set up alternating row colors //************************************************************************** ************ String bgColor = "silver"; %> <logic:iterate id="ohl" name="ohl" type="com.leescarpet.claimsautomation.OrderHeaderBean" scope="request" > <% //************************************************************************** ************ // Set up alternating row colors //************************************************************************** ************ bgColor = bgColor.equals("silver")? "white" : "silver"; %> <TR bgcolor = "<%= bgColor %>" > <TD width="125"><jsp:getProperty name="ohl" property="invoiceNumber"/></TD> <TD width="89"><jsp:getProperty name="ohl" property="invoiceMonth"/></TD> <TD width="185"><jsp:getProperty name="ohl" property="customerName"/></TD> <TD width="148"><jsp:getProperty name="ohl" property="orderNumber"/></TD> <TD width="114"><jsp:getProperty name="ohl" property="orderDate"/></TD> </TR> </logic:iterate> </TBODY> </TABLE> </FORM> </BODY> </html:html> When I try to run this application in the Websphere test environment, I get this error: Unhandled error! You might want to consider having an error page to report such errors more gracefully com.sun.jsp.JspException: "Directive: Invalid attribute, prefix" java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String)..... The error messag indicates there is someing wrong with the tag library directive but I don't see it. I have the struts-logic.tld file in the web-inf directory of the test environment and have modified the defaultapp xml document by adding this: <taglib> <taglib-uri>/Web-inf/struts-logic.tld</taglib-uri> <taglib-location>/Web-inf/struts-logic.tld</taglib-location> </taglib> Any suggestions??? Stephen Gibson Lees Carpets _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l or email: JAVA400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.