Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL help needed

 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i have written first EL. Following is the code :

<html>
<body>

${1 + 2}

</body>
</html>


It simply displays ${1 + 2} instead of 3. Is there something wrong with code/do i need to make any update in web.xml etc.I am using tomcat 5 and above.
 
Jingh Yi
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest you do 2 things:

1. use a web app server which serves JSP 2.0 Spec; I use Tomcat 5.0.
2. add '<%@ page isELIgnored ="false" %>' as first line in your jsp.

After you've done that, you will get your EL working.

Good luck!
 
Sandeep Desai
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also make sure that your deployment descriptor (web.xml) has the web-app tag
defined as below

<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">
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic