It's not a secret anymore!
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem with HttpSession in Struts2" Watch "Problem with HttpSession in Struts2" New topic

Problem with HttpSession in Struts2

Tan Nguyen

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

Joined: Aug 03, 2008
Posts: 9453

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
I agree. Here's the link:
subject: Problem with HttpSession in Struts2
It's not a secret anymore!