Hi Kris,

Thanks!

I thought I had tested it under the app's WEB-INF/lib, but the jars were also in tomcat's shared/lib at the time. I also got it working via a tagPlugins.xml in the app's WEB-INF, but this way is much cleaner. Serves me right for deviating from the docs.

Cheers,
Patrick.

Kris Schneider wrote:
If you dump stuff in $CATALINA_HOME/shared/lib, then Tomcat internal classes
can't "see" it:

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html

Generally speaking, it's best to keep taglib JAR files in the app's WEB-INF/lib
directory.

Quoting Patrick Bourke <[EMAIL PROTECTED]>:


Hi all,

I'm trying to get up and running with the JSTL standard tags, and am receiving a compile error that I can't sort out. I've got a simple page with which I'm tying to use the JSTL core and fmt namespaces. Here is my JSP page:

<[EMAIL PROTECTED] language="java" contentType="text/html" %>
<[EMAIL PROTECTED] prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
<[EMAIL PROTECTED] prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"; %>
... (html snipped) ...
User is ${user.username}<br>
This login was at ${user.loginDate}<br>
Last login was ${user.lastLoginDate}<br>
<c:forEach var="prop" items="${user.dataMap}">
        <c:out value="${prop.key}"/> = <c:out value="${prop.value}"/><br/>
</c:forEach>
... (html snipped) ...

I have placed jstl.jar and standard.jar from jakarta-taglibs-standard-1.1.1 in my tomcat's shared/lib directory. (I've also tried the versions from 1.1.0 with the same result).

When I hit this page I get the following error:

- Could not complete request
org.apache.jasper.JasperException: Unable to compile class for JSP

Generated servlet error:


C:\tomcat5\work\Catalina\localhost\SCS\org\apache\jsp\WEB_002dINF\jsp\homepage\homepage_jsp.java:128:


_jspx_meth_c_out_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext,int[])

in org.apache.jsp.WEB_002dINF.jsp.homepage.homepage_jsp cannot be applied to


(org.apache.taglibs.standard.tag.rt.core.ForEachTag,javax.servlet.jsp.PageContext,int[])

if (_jspx_meth_c_out_0(_jspx_th_c_forEach_0, _jspx_page_context, _jspx_push_body_count_c_forEach_0))
^
Generated servlet error:



C:\tomcat5\work\Catalina\localhost\SCS\org\apache\jsp\WEB_002dINF\jsp\homepage\homepage_jsp.java:133:


_jspx_meth_c_out_1(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext,int[])

in org.apache.jsp.WEB_002dINF.jsp.homepage.homepage_jsp cannot be applied to


(org.apache.taglibs.standard.tag.rt.core.ForEachTag,javax.servlet.jsp.PageContext,int[])

if (_jspx_meth_c_out_1(_jspx_th_c_forEach_0, _jspx_page_context, _jspx_push_body_count_c_forEach_0))
^



This is strange, as ForEachTag should be assignable to a JspTag argument in the methods _jspx_meth_c_out_0 and _jspx_meth_c_out_1.


Here are the details of my setup:
tomcat 5.0.28
j2sdk 1.4.2_05-b4
winxp home
jstl.jar and standard.jar in TOMCAT_HOME/shared/lib
no additional JSTL specific changes to web.xml, server.xml, etc

Any help or pointers would be greatly appreciated!

Patrick.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to