Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP sessions under Websphere  RSS feed

 
Gaelle SMITS
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi !
I have a problem with JSP sessions under WAS 3.5.4.
I wrote an application with sessions that worked under Tomcat, and now that I have to migrate to Websphere, lines such as :
tf = (String)session.getAttribute("id");
won't work : I get the error :
com.sun.jsp.JspException: Compilation failed
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code)
...
I am sure that the error comes from this since I have commented any other line, and it doesn't work any longer as soon as I add this one...
Can anybody help me ?
 
Caven Wang
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
would you like to try:
session.getAttribute ("id").toString();
 
Balaji Munuswamy
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the Servlet API Version.
I feel will not support session.setAttribute() and session.getAttribute().
Try with session.putvalue() and getValue() methods.
 
Gaelle SMITS
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much !
The problem was indeed coming from the version of my JSP API (1.0 and not 1.1).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!