• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to run EL code using Tomcat

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am facing problems running anything related EL. It just prints the ${} when I ask it to print any JSP. Do I need to keep any jar in the lib of my application. Forgot to mention I am using TOMCAT.

Appreciate your reply

Madhu
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

make sure it is tomcat version 5,
you dont have to anything specific to make the el work, by default it should work,

only for the jstl you need to copy the jstl.jar and the standard.jar files in the WEB-iNF/lib directory of the webapp

Sami
 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
don't know whether you need to specify the web-app tag like this to get it working :-

<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">
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi madhu,
There is no need to keep any jar files. Ensure that you are using JSP 2.0 and Tomcat 5 or above.
I too faced the same problem. So I used <%@ page isELIgnored="false"%> explicitly in my JSP page, then it worked.
Just try using like this.. u will get it..

cheers,

Sudhakar.
 
Ranch Hand
Posts: 250
Python Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This may sound funny but it's true that for Tomcat 5 to make the EL work you need not change web.xml as said above but rather use the isELIgnored="false" page attribute as mentioned by Sudhakar above. Funny because, by default the isELIgnored attribute is supposed to be "false", yet you need to specify it explicitly.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Forget about isELignored and do as Giju George told you.
You have to use version 2.4, because EL is ignored by default in 2.3
 
Debashish Chakrabarty
Ranch Hand
Posts: 250
Python Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

However, I agree that it also works with the modified web.xml, as mentioned above and "without" using isELIgnored page attribute.
[ December 14, 2005: Message edited by: Debashish Chakrabarty ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are using 2.3, so EL is disabled by default. As you said, you have to set isELIgnored to false to make it work.

If you'd be using 2.4, EL would be enabled by default.

"Madhu Kumar Vatts" is probably studying for the latest version of SCWCD,
so it is probably a better idea to use 2.4, and modify web.xml.
 
reply
    Bookmark Topic Watch Topic
  • New Topic