Hi,

I have a jsp page which is refreshed atuomatically every 10 seconds.I
get and put values in the session by using the implicit session variable
. Everything works fine for say 2-3 mins after that the implicit session
becomes null and throws a null pointer exception. 

I get a null pointer exception and session is printed as null but even
the if block (session == null) is not executed .

I printed the value of request.getSession(false);.This gives me session
object ,where as the implicit session does not have this after many
refresh interval  

During the first few refreshes both have the same value. 

Also note that this runs fine in Windows ,I get this problem only in
UNIX . I use tomcat 3.2 in unix and view using IE in windows 

I tried in tomcat 4 also I still get the same exception 

FIND below the code in JSP 
try{
      if (session == null){
          System.out.println("session is null:::");
      }
     System.out.println("session3:::"+session.toString());
      if (session.isNew()) {
          System.out.println("HI");
 
session.setAttribute(BPRealtimeConstants.C_JPM_SESSION_FAIL_ID,"failed")
;    
           response.setHeader("Refresh","1; URL=/MCOne/BP/index.html");
           return;
      }
} catch (Exception e) {
   System.out.println("I am in exception ");
   System.out.println("I am after hello
::::"+request.getSession(false));
   e.printStackTrace();
}       
 
I am unble to find any resource on the net which might help me identify
the problem ,I am posting this for the second time .
Can there be any difference in session handling when tomcat is run in
unix and Windows.
Any inputs will really help me solve this production problem
 
 
Thanks and Regards
Mukund
 
 

Reply via email to