Try no-cache, max-expires HTTP headers in your in your response, its also possible to provide these in struts-config. This would prevent you from including it in all your JSPs. <% response.setHeader ("cache-control", "no-cache"); response.setHeader ("expires", "-1"); %>
I'm not exactly sure of the struts-config part, please refer to the DTD. This will prevent the page from being cached and would be retrieved every time. :) -----Original Message----- From: Georg Filios [mailto:[EMAIL PROTECTED] Sent: Thursday, July 22, 2004 3:16 PM To: Struts Users Mailing List Subject: Re: Error: html:multibox, backbutton, BeanPopulate Exception (IndexOutOfBoundsException) Hi, i am looking for preventing caching. So I am responsible on the server side, no matters what the users browser is. Regards, georg Am 22.07.2004 um 11:36 schrieb Raghuram Kanadam: > George are you looking from preventing the user from going back or are > you looking for preventing caching? > > -----Original Message----- > From: Georg Filios [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 22, 2004 3:06 PM > To: [EMAIL PROTECTED] > Subject: Error: html:multibox, backbutton, BeanPopulate Exception > (IndexOutOfBoundsException) > > > Hi, > > I am having a unnices error, which I can't solve. Even I am having > found any hints in the archives, making me very nervous, > that I totally messed up some concepts. > > Here is my Problem: > > I am using a html:multibox to select some entries (the number of the > entries, is dynamic) i.e 5 different. > > When I submit the form, everything goes fine, and after validation in > my action form, > I can remove in my model all entries, not checked. The model with the > pruned entries is stored in my session > again (i.e. now I am having 3 entries) > > Now the problem occurs. If the user hits the back button (which he is > isnt supposed to), > he sees the form with all entries ( 5 entries), which makes sense, > since the browser recalls the cached page. > > Now if the user select again a checkbox and submits, i get the an > IndexOutOfBoundsException (see below). > What makes me really nervous is the fact, that it happens all before > any of my Actions or Forms are getting involed (except my > ActionForm.reset method) > So I cant Intervent the double submit (i.e. by using tokens). > > Any Ideas how to prevent this siutation, or what might be the real > cause (since I dont fully understand what happens) > > regards, > > Georg > > here is my JSP-CODE: > <logic:iterate id="category" name="GenerateCategoryForm" > property="Categories" indexId="idx"> > <html:multibox property="checkedCategories"><%=idx%><br> > </logic:iterate> > > > here is the Exception: > > exception > javax.servlet.ServletException: BeanUtils.populate > > org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254) > > org.apache.struts.action.RequestProcessor.processPopulate(RequestProces > s > or.java:821) > > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java > : > 254) > > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) > > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > javax.servlet.http.HttpServlet.service(HttpServlet.java:810) > > de.creativetank.gamble.app.websecure.LoggedInFilter.doFilter(Unknown > Source) > > > root cause > java.lang.IndexOutOfBoundsException: Index: 2, Size: 1 > java.util.ArrayList.RangeCheck(ArrayList.java:507) > java.util.ArrayList.get(ArrayList.java:324) > > org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyU > t > ils.java:503) > > org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyU > t > ils.java:410) > > org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUt > i > ls.java:749) > > org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.ja > v > a:780) > > org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:793) > > org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726) > > org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252) > > org.apache.struts.action.RequestProcessor.processPopulate(RequestProces > s > or.java:821) > > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java > : > 254) > > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) > > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > javax.servlet.http.HttpServlet.service(HttpServlet.java:810) > > de.creativetank.gamble.app.websecure.LoggedInFilter.doFilter(Unknown > Source) > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > cheers, georg ------------------------------------------------------------------------ ------------------------- Degerstrasse 24 40235 Düsseldorf Tel Privat: +49 211 6182006 Tel Mobil: +49 160 94439860 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]