> I have some (ActionForward) servlets getting executed when jumping from
> one page to another, retrieving data from a database and putting them in
> an ArrayList which I put as an Attribute to my HttpSession. My next jsp
> gets these entries from the ArrayList and displays them.
> When I retrieve this data the first time I get it displayed well - then
> I add some data within this jsp and set an ActionForward (what I think
> will be translated in a jsp:forward-tag by struts) to the same jsp to
> get my changes displayed within the same page where I entered them.
> Before this forward executes, I use another servlet to unbind the old
> ArrayList (in fact, I unbind the SessionAttribute) and get a new list
> from my db, putting her as a new Attribute with the same name like the
> old one to my session.
> I expect now to get my new, updated list in my jsp. But it didn't get
> displayed now. Is this a common problem that perhaps Tomcat has the old
> page within its memory?
Try adding the following toward the top of your page:
<%
response.setHeader("Pragma","No-cache");
response.setDateHeader("Expires",0);
response.setHeader("Cache-Control", "no-cache");
%>
Let me know if this fixes your problem.
-David Castro
email[at]davidcastro[dot]com
http://jsp.davidcastro.com
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com