You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Valter G. Nogueira Jr." <va...@intersic.com.br> on 2004/06/21 22:33:26 UTC

Enabling EL on Tomcat 5.0

I am following the book Java Server Pages, 3rd Edition and all samples run in a snap.

But when I try to use EL no my pages it doesn't work. I mean if a write:

${1+2+3}

I got the ${1+2+3} instead of 6


 How should I configure tomcat to evaluate expression?

Thanks,

Valter

Re: Enabling EL on Tomcat 5.0

Posted by Stephen Souness <so...@hotmail.com>.
I had a similar problem recently

Assuming that you have the appropriate jar files in the appropriate 
locations you will need the following in your application's web.xml

<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 web-app_2_4.xsd"
     version="2.4">


...
and something like the following in your JSP

<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

this tells Tomcat to be compatible with the appropriate version of the 
Servlet spec and to refer to the appropriate jstl version.




Valter G. Nogueira Jr. wrote:
> I am following the book Java Server Pages, 3rd Edition and all samples run in a snap.
> 
> But when I try to use EL no my pages it doesn't work. I mean if a write:
> 
> ${1+2+3}
> 
> I got the ${1+2+3} instead of 6
> 
> 
>  How should I configure tomcat to evaluate expression?
> 
> Thanks,
> 
> Valter


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