• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hi..please help me out

 
khushhal yadav
Ranch Hand
Posts: 242
Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

when i am writing


${pageContext.session.id}<br>
${pageContext.session.creationTime}<br>
${pageContext.session.lastAccessedTime}<br>
${pageContext.session.maxInactiveInterval}<br>
${pageContext.session.servletContext}<br>

I am getting the same text as it is printed in the browser.

Earlier It was working fine. But now i don't know what happened, instead of displaying the desired output, browser is displaying the code as it is.
It's happening only for the EL expressions. Other things are working fine.

I am using IE6 as a browser and Tomcat as a container.
Please help me out.

Regards,
Khushhal
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like the EL has been turned off. Have you recently changed either JSP levels or web containers?

To make sure the EL is turned on , add this to your web.xml file

<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<el-ignored>false</el-ignored>
</jsp-property-group>
</jsp-config>
 
khushhal yadav
Ranch Hand
Posts: 242
Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nop Michael

I haven't done qanything like that in DD.

Nor i have include page directive with
<%@ page isELIgnored="true"%>

Regards,
Khushhal
 
khushhal yadav
Ranch Hand
Posts: 242
Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I reinstalled Tomcat and now it's working fine.
But couldn't make out, what happened!!

Regards,
Khushhal
 
nagalatha mitta
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
<%@ page isELIgnored="false"%>.if you include this statement in your jsp ,then you may get expeceted result
 
khushhal yadav
Ranch Hand
Posts: 242
Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nagalatha

That's what I usually do.
But that was not working.

Anyways thanks a lot for your replies.

Regards,
Khushhal
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One reason is your tomcat is not JSP 2.0 compliant.

Another possible cause is, even if your web container is jsp 2.0 compliant but your web.xml contains this

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtds/web-app_2_3.dtd">

instead of this

<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">

The container considers your app as j2ee 1.3 app.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic