tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Seth Ladd <s...@ehawaii.gov>
Subject Possible Bug with JSPC with c:import of JSP 2.0 page?
Date Wed, 31 Dec 2003 19:30:43 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I'm not sure what's really the issue here, and hopefully someone can
help explain this.  I'm using Tomcat 5.0.16, Suse9, and Sun's JDK 1.4.2.
~ I'm using Ant 1.5.4 and the JSPC tasks from Tomcat.

I originally had a single JSP 2.0 file that had this snippet:

<%@ page language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

[SNIP]

<head>
~  <c:choose>
~    <c:when test="${requestScope.contentType eq
~                'application/xhtml+xml'}">
~       <meta http-equiv="content-type" content="application/xhtml+xml;
charset=utf-8"/>
~    </c:when>
~    <c:otherwise>
~       <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
~     </c:otherwise>
~  </c:choose>
</head>


And it worked great.  Then, I took out the <c:choose>..</c:choose> and
placed it into it's own file, which looked like this:


<%@ page language="java" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

<c:choose>
	<c:when test="${requestScope.contentType eq 'application/xhtml+xml'}">
	<meta http-equiv="content-type" content="application/xhtml+xml;
charset=utf-8"/>
	</c:when>
	<c:otherwise>
	<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
	</c:otherwise>
</c:choose>


And then modified the first file to this:

[SNIP]
<head>
	<c:import url="/jsp_include/meta_contentType.jsp"/>
</head>


I would then get this error:


javax.servlet.ServletException: /jsp_include/meta_contentType.jsp(5,1)
According to TLD or attribute directive in tag file, attribute test does
not accept any expressions



So my question is this:  Why would this happen?  The solution was the
change the taglib from core to core_rt in the imported file.  Why would
it work inside the main file, but start failing once I took it out and
placed it in its own include file?

Any ideas or tips?  It's working now, but I don't think I should have to
make core into core_rt

Thanks very much, and sorry for the long setup to the question. :)

Seth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/8yPj5EIB1scRes8RAguRAJ99K/XiL/j1MCQ78zVuqTTFdFtj1wCgigkn
ubpK8ZpQVJPtkY955NyZ+Xs=
=lE2Y
-----END PGP SIGNATURE-----


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


Mime
View raw message