Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jsp bean values not updating - need refresh?

Status
Not open for further replies.

excession

Programmer
Sep 22, 2004
111
0
0
GB
I have a jsp based web application.

We have a main.jsp page which has a series of includes in so that depending on if the user is logged in or not, they will see different headers and menus. When they log in the login.jsp page sets the username and id of a bean and includes a welcome message if the login was successfully.

The problem is the main.jsp page for some reason cannot see the new data in the bean and still displays the pages as if the user isn't logged in.

Any ideas? Is it possible to make the server or browser reload everthing?

Thanks in advance
 
<%
response.setHeader("Cache-Control","no-store"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
%>
try add this three lines
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top