tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Tim" <Tim.C...@NielsenMedia.com>
Subject RE: taglib standard 1.0 in Tomcat
Date Fri, 27 Feb 2004 19:41:30 GMT
When you said you have a 2.4 web.xml
It has:
<?xml version="1.0" encoding="ISO-8859-1"?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
	// your web-app contents here

</web-app> 
??
I only ask because I don't see a listing for you web.xml and that was what
caused my very similar problem before.

-Tim

-----Original Message-----
From: Hassan Schroeder [mailto:hassan@webtuitive.com] 
Sent: Friday, February 27, 2004 1:41 PM
To: Tag Libraries Users List
Subject: Re: taglib standard 1.0 in Tomcat

Hans Bergsten wrote:

> Unless there's a copy of this example in another O'Reilly book, this
> looks like an example from my book named "JavaServer Pages, 3rd
> Edition", 

Unforunately I don't have your book, but I thought I'd try this out;
using Tomcat 5.0.19 and Java 1.4.1, an embedded EL expression like:

<c:set var="whatever" value="WHATEVER"/>
<p>OK, ${whatever}</p>

:: produces
	OK, WHATEVER

but the cited example (with added catch tag):

<c:catch var="oops">
<c:set var="sessionCounter" scope="session" value="${sessionCounter + 1}"/>
<c:set var="applCounter" scope="application" value="${applCounter + 1}"/>
</c:catch>
<c:if test="${not empty oops}">
	<c:out value="${oops}"/>
</c:if>

:: gives me the output

javax.servlet.jsp.el.ELException: An exception occured trying to
convert String "${sessionCounter + 1}" to type "java.lang.Double"

I do have a 2.4 web.xml, JSTL 1.1 jars (and presumably the first
trivial example wouldn't work if all that wasn't right).

Any thoughts? Does your original full example from the book define
sessionCounter and applCounter somewhere else prior to use?

TIA!
-- 
Hassan Schroeder ----------------------------- hassan@webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.



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

---------------------------------------------------------------------
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