• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Problem Using Expresssion Language code in Tomcat

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
I have add.jsp which has the following code:-

<%@ page contentType="text/html" %>

<HTML>
<BODY>
1+2+3 = ${1+2+3}
</BODY>
</HTML>


when i run the jsp in Tomcat 5.0 the Expression Language is not evaluated and i get the output as:-

1+2+3 = ${1+2+3}

Please help!
Thanks.
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, check your Tomcat version. If I'm not mistaken, JSP 1.2 and Servlet 2.4 works only in tomcat version 5.x

Next, check your web.xml file. It should declare your application uses the specifications mentioned above.
This is how the tag should look like:
 
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

JSP 1.2 and Servlet 2.4 works only in tomcat version 5.x



I'm sure Pedro meant JSP 2.0.

And yes, he is corect. For tomcat to 'switch on' JSP 2.0 EL processing, the web app must be declared as a Servlet 2.4 web application as he indicated.
 
I've got no option but to sell you all for scientific experiments. Or a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic