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 not recognized in the JSP - Why?

 
Charlie A
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

i have a created a simple file called simple.jsp and the code is as

below.

simple.jsp
------------

<html>
<body>
The hostname is ${header.host}
</body>
</html>

I am not getting the expected output.

Expression Language is not recognised in the Jsp it seems.

Output
-------
The hostname is ${header.host}


I also tried to add the page directive tag in my simple.jsp file.

I know that EL is enabled by default. But i made a try with the below tag.

<%@ page isELIgnored="false" %>

But I am getting an error. It seems that the attribute isELIgnored is not

recognised.

can anyone help on this? It would be very grateful if you answer this.
 
Jingh Yi
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use Tomcat 5 and you should be fine. The possible cause is that your app server doesn't implement JSP 2.0 spec. And EL needs JSP 2.0.
 
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