File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Problems on Refresh Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Problems on Refresh" Watch "Problems on Refresh" New topic
Author

Problems on Refresh

Adrian Muscalu
Ranch Hand

Joined: May 08, 2000
Posts: 73
My JSP page reads some data from a bean. The problem is that when a refresh appears, my page does not read anymore from the bean; instrad, it shows the values from the first initialization.
Where could be the problem?
Yours greenhorn,
Ady


SCJP2, SCWCD
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12265
    
    1
It sounds like you are getting a new Bean with every request-response transaction.
If you want to save the state of the Bean between calls, you will have to attach it to the session with setAttribute() or make other provision for preserving it.
Bill

Java Resources at www.wbrogden.com
Adrian Muscalu
Ranch Hand

Joined: May 08, 2000
Posts: 73
Thank you for your reply Bill; in the meantime I've found a solution that is more suitable to my case:
<meta http-equiv="Expires" content="0"> produces exactly the effect that I wanted.
Regards,
Ady
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problems on Refresh
 
Similar Threads
Stripes state management problem
JSF Browser Refresh
i need default page when reload(refresh) the jsp page
struts action called on refresh
Calling a Managed Bean method from Servlet