• 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

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: 67747
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.
 
Self destruct mode activated. Instructions for deactivation encoded in this tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic