File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Android Security Essentials Live Lessons this week in the Android forum!
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: 9291

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
wood burning stoves
subject: Problem with HttpSession in Struts2
Similar Threads
Check NULL in JSTL
JSTL how to use ELSE in JSP
enabling side menu based on user role in JSP?
how to avoid show buttons
Mixing JSP and Scriptlets throws compilation errors