tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ignacio Iborra" <na...@bibvirtual.bimicesa.ua.es>
Subject Expression language in Tomcat 6
Date Fri, 16 Nov 2007 09:22:29 GMT
Hi.

After some hours trying to execute a simple example of a taglib
(displaytag), just one moment before going completely crazy, I've found the
problem.

I wanted to make a query to a database and show the results in a table using
the display tag library. But the expression language was not recognized by
Tomcat. After searching in Google, I've found that I have to put some
attributes in the web-app tag of my web.xml in order to enable this feature.
Something like this:

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

....

</web-app>

With this schema I can put EL in the attributes of the tags I use, such as:

<sql:query dataSource="${db}" var="result">
...
</sql:query>

... but I cannot put them OUTSIDE the tags, I can't do something like this:

<html>
<body>
Hello ${param.name}
</body>
</html>

To achieve this, I have to add some tags in web.xml:

<jsp-property-group>
  <url-pattern>/*</url-pattern>
  <el-ignore>false</el-ignore>
</jsp-property-group>

So my question is... Why the hell Tomcat does not accept EL by default in
ANY place of ANY page? How is it possible that, after some years of
standardization of the EL Tomcat rejects it outside the tags by default? Any
other clean idea to make this work in a web application without introducing
this code in each web.xml?

Thanks in advance.



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