• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session expires ,user session expires when online

 
supriya riya
Ranch Hand
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I check for session value on jsp page and its null,so session expires and it shows the related page asking for login again,online.But on local host it works fine.
I am using a cache manager class,in it caching attribute value of "loginid",which i check for session expires or not in jsp.But problem is how do i get "loginid" which i take from jsp



from servlet to cacheManager.java



in servlet i use setAttribute and set searchcategory taken from cacheManager.Above code worked fine,solved my problem of online search.but i want single "loginid" value from Servlet which i took from jsp shown above, in cacheManager.java
so that i can

cacheMap.put(loginid, loginid1);

Correct me if i am wrong,anywhere.
 
supriya riya
Ranch Hand
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So how to i get the value from servlet to .java class,and set attribute successfully so as to pass it to my jsp.
 
supriya riya
Ranch Hand
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,i have got the values from cacheManager and set it in session.setAttribute.The "loginid" which i check for session expired.But User still cannot maintain session when website runs online.
Help will be greatly appreciated.
 
Vijitha Kumara
Bartender
Posts: 3908
9
Chrome Fedora Hibernate
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
supriya riya wrote:I am using a cache manager class,in it caching attribute value of "loginid",which i check for session expires or not in jsp.But problem is how do i get "loginid" which i take from jsp


Your logic is not that clear to me. How you obtain the session for a client?
 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I still don't understand your question...
 
supriya riya
Ranch Hand
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In loginhandler.Values on this servlet come from index.jsp.



this is section handling particular user logins.

In adminhome.jsp for admin login.It logs in sucessfully.But after logging in when i click other links like update admin etc,it shows session expired.



Problem is on localhost my user sessions are maintained,but when i deploy war file online it does not maintain user session.It goes to session expired page when i click any other jsp page link.
Do i need to post more details.
 
Frank Eichfelder
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps you have enabled Session-Cookies for Localhost, but not for the Remote-System in your browser-settings.
In your Source-Code, you do not have any statements for URL-Rewriting when cookies are disabled, so without session-cookies your application will lose the session every time the user clicks on a link.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic