Forums Register Login

Doubt in Session Management

+Pie Number of slices to send: Send
Hi Friends,

I have a problem in the session management.

I need to maintain the login user-id in my application...
For each database interaction I need to send the user-id..
I am maintaining the user-id and other info in a bean and I put that bean in a session variable..

But some times the session will automatically closed and gives nullPointerException when I try to call the session variable.

ex:bean.getUserId();

I am also trying to give the session max age in the web.xml
<session-config>
<session-timeout>0</session-timeout>
</session-config>

But this is also not solve my problem..

Right now I am using RAD to develop my application...
When I run my application in the local system this session problem araises.

please give my any suggestion to solve the problem..

Regards,
ChakraPani.M
[ March 31, 2008: Message edited by: Bear Bibeault ]
+Pie Number of slices to send: Send
 

Originally posted by ChakraPani Margani:

But some times the session will automatically closed and gives nullPointerException when I try to call the session variable.



If you're using HttpSessions to manage your logins, which is common, you probably want to redirect to the login page when a user's session expires.
+Pie Number of slices to send: Send
could you let us see your related code.
Our first order of business must be this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 723 times.
Similar Threads
how to handle session timeout
WEB-INF/web.xml-help
Session Invalidation and Timeout !
Problem with database timeout using Hibernate
Doubt Regarding the Session
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 07:47:05.