This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Can someone help me on EL ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Can someone help me on EL ??" Watch "Can someone help me on EL ??" New topic
Author

Can someone help me on EL ??

Bm Bm
Greenhorn

Joined: Sep 20, 2005
Posts: 6
Hi,
I am using tomcat 4.1.31 which supports JSP 1.2
I wrote a JSP :

<%@ page isELIgnored="false" %>
<HTML><BODY>
${param.name}
</BODY></HTML>

I have done following entry in web.xml
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<el-ignored>false</el-ignored>
</jsp-property-group>

While running the JSP with above mentioned page directive the container throws an exception saying that
Page directive has invalid attribute: isELIgnored

When i remove the page directive. The output is on the browser is simply the string
${param.name}

As the container gracefully accepts the entry in DD. It is doubtless that the container supports EL.

Can someone tell what am i missing? and what should i do to enable the EL and get the desired output ??

--------------------------------
Regards,
BM.
SCJP 1.4 - 98%
SCWCD Preparing....
Will Lee
Ranch Hand

Joined: Mar 16, 2005
Posts: 58
I came across similar problem before. I can't explain why, but it seems to related to version of JSTL. The one I came across is: On old tomcat (v4.X), the uri is something like uri="http://java.sun.com/jstl/core", I can't use EL such as ${param.userName}, it only print out same thing, not value (just like EL is ignored), to output the value I have to use <c ut value="${param.userName}" />

However for Tomcat V5.5 (didn't try 5.0), the uri is "http://java.sun.com/jsp/jstl/core", it works on opposite way: It won't take <c ut value="${...}"/>, exception will be thrown and said "the taglib said won't take ${} for c ut value), but it works perfectly when you only use ${param.userName}: it output only the value


SCJP 1.4, SCWCD, SCDJWS
Karthik Rajendiran
Ranch Hand

Joined: Aug 13, 2004
Posts: 211
Hello Friends,
I think EL is part of JSP2.0 spec. Try download tomcat 5.0.28 or greater ones and try

FOR JSTL
Tomcat 5.0 > onwards you need not web.xml entry to locate tld.
Just placing the standard.jar and jstl.jar in lib directory of ur webapp will solve


SCJP 1.4 SCWCD 1.4 SCDJWS 1.4
Bm Bm
Greenhorn

Joined: Sep 20, 2005
Posts: 6
Hey Karthik, if EL had been a part of JSP 2.0 then container would not have accepted the DD entry related to EL.
 
 
subject: Can someone help me on EL ??
 
Similar Threads
EL question
el-ignored query
EL Hell
is it required to set el-ignored to true in DD?
EL Mock Question