• 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

Keeping Session Values !

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In one JSP page , I have declared a session variable as -->
session.setAttribute("S_USERID",strUserId);
where strUserId is a STRING variable with some value .
If I get the Session variable in the same page using -->
String strUsr = (String)session.getAttribute("S_USERID")
the value is retrieved , but if I use the same Syntax in the next JSP Page where the control goes , the value retrieved is NULL .
I have also used the following tag in the next JSP Page -->
<%@ page session="true" %>
I have even checked the Session Ids in both the pages , they are the same.
Can u tell me why it is happening ?
I am using iPLanet Application Server . Do I need to set some parameters while deploying ?
Also suggest me a possible solution .
 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as I am concerned it should work.
are u giving this code at the begining of each page
<%@ page language="java" session="true" %>
I suppose try changing the server.
I am using resin server..quite good..infact tomcat had given me some problem..but this is a very user friendly server.
hope this helps
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic