Session Variables becoming null

Discussions

EJB programming & troubleshooting: Session Variables becoming null

  1. Session Variables becoming null (1 messages)

    Hi every body,

    We are using weblogic version 5.1 swervice pack 12, on sun solaris ver 4.7.

    During Accessing the web-pages(JSP) our session variable becomes null. but, this does not happen every time we access the pages, also this does not happen on any particular web page.
    The values in session becomes null vary randomly.

    we have checked the cookies settings on the browsers that we are using and found that the cookies are enabled.

    We are checking for the logged in user id in every page, and printing the values of this variable in the log file.

    Any body has any idea, why this is happening?

    Sameer.

  2. You can set the maxinactiveinterval on the httpsession.

    A negative time indicates session should not timeout for infinite time.

    http://java.sun.com/j2ee/sdk_1.2.1/techdocs/api/javax/servlet/http/HttpSession.html#setMaxInactiveInterval(int)