The header can be set to specify not to cache the page using :
Meta tags <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> ... this will be more of 
browser specific.
or set the Header object which can then take care of caching at the webproxy.

Better option will be the use of Struts-workflow extension which can prevent the user 
from entering into an action other than the predefined order of action ...

Rahul

-----Original Message-----
From: Georg Filios [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 22, 2004 3:18 PM
To: Struts Users Mailing List
Subject: Re: Error: html:multibox, backbutton, BeanPopulate Exception
(IndexOutOfBoundsException)


Hi,
i would like to prevent caching..
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]





Confidentiality Notice

The information contained in this electronic message and any attachments to this 
message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged 
information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to