tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Expression language in Tomcat 6
Date Fri, 16 Nov 2007 21:05:36 GMT
> From: Ignacio Iborra [mailto:nacho@bibvirtual.bimicesa.ua.es] 
> Subject: Expression language in Tomcat 6
> 
> Why the hell Tomcat does not accept EL by default in
> ANY place of ANY page?

It appears that it actually does, as long as the servlet spec version is
2.4 or above.  Look at webapps/examples/jsp/jsp2/el, and you'll see
numerous expressions in arbitrary places.  I tried the following and it
works properly under 6.0.14, displaying "Hello 3" (without the quotes):

<html><body>
Hello ${1 + 2}
</body></html>

> <web-app id="WebApp_ID" version="2.4"
> 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">

Most (all?) other web.xml files I've seen put version= last; it
shouldn't make a difference, but...

> Any other clean idea to make this work in a web application 
> without introducing this code in each web.xml?

By any chance, is <el-ignore> set to true in conf/web.xml?  Or is there
some standard include you're using that sets isELIgnored?  If so, it
would inhibit evaluation in all webapps/JSPs that don't explicitly
reverse that setting.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message