aspose file tools*
The moose likes Struts and the fly likes Problem with HttpSession in Struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem with HttpSession in Struts2" Watch "Problem with HttpSession in Struts2" New topic
Author

Problem with HttpSession in Struts2

Tan Nguyen
Greenhorn

Joined: Apr 13, 2011
Posts: 1
I am doing a multi user login application where I use session to store the user object.


In every page I am checking using JSTL whether the user object is present in the session.


My problem is that if the user clicks on a href link in the application the user changes to Previous user in the session. i.e. the it is loading the user from cache. If I refresh the page it will load the correct user.

How could I fix it?
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9305
    
  17

This is probably a browser caching issue not a problem with your application logic. Take a look at this page...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem with HttpSession in Struts2