tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject Re: Tomcat 5 JSTL compile error
Date Tue, 14 Sep 2004 19:24:34 GMT
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 <pbourke@semaview.com>:

> 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:
> 
> <%@page language="java" contentType="text/html" %>
> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
> <%@taglib 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.

-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message