Re: EL expressions not being evaluated..
maya <[email protected]>
| Newsgroups | gmane.comp.jakarta.taglibs.user |
|---|---|
| Message-ID | <[email protected]> |
Kris Schneider wrote:
> maya wrote:
>> again, thank you all very much.. as mentioned, I have Tomcat 5.0.27,
>> which comes with the following (as specified in release-notes.txt that
>> comes with it):
>>
>> * commons-collections*.jar (Commons Collections 2.1 or later)
>> * commons-dbcp.jar (Commons DBCP 1.1 or later)
>> * commons-el.jar (Commons Expression Language 1.0)
>> * commons-logging-api.jar (Commons Logging API 1.0.3 or later)
>> * commons-pool.jar (Commons Pool 1.1 or later)
>> * jasper-compiler.jar (Jasper 2 Compiler)
>> * jasper-runtime.jar (Jasper 2 Runtime)
>> * jsp-api.jar (JSP 2.0 API)
>> * commons-el.jar (JSP 2.0 Expression Language)
>> * naming-common.jar (JNDI Context implementation)
>> * naming-factory.jar (JNDI object factories for J2EE ENC support)
>> * naming-resources.jar (JNDI DirContext implementations)
>> * servlet-api.jar (Servlet 2.4 API)
>>
>> this means my EL expressions should evaluate, right?
>
> Don't worry about that stuff, focus on your app. The first thing to do
> is to make sure you're using a Servlet 2.4 web.xml. It should look
> something like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <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">
>
> ...
>
> </web-app>
>
> If you're using a Servlet 2.3 web.xml, then EL will be ignored by default.
>
thank you very much.. I put what you posted in my web.xml (in lieu of
what I had there previously (and what I have in all web.xml's in
Tomcat), namely
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
....
I put the code you posted in both the web.xml for the particular webapp
and in conf/web.xml.. but EL expressions are still not evaluating..
this is how a JSP with EL prints in the browser (IE & FF..)
Request Method: ${pageContext.request.method}
Request Protocol: ${pageContext.request.protocol}
Context Path: ${pageContext.request.contextPath}
....
Remote Host: ${pageContext.request.remoteHost}
Secure: ${pageContext.request.secure}
Cookies: ${c.name}: ${c.value}
Headers: ${h.key}: ${value}
thanks again....