RE: Struts Validator overriding cache-control?

2004-01-15 Thread Brown, James
Just to follow up with a few questions, based on the following statement:

It is my assumption in this scenario that the browser (IE) has cached the URL and data 
posted to said URL, thus it is able to redisplay the page with the data the user has 
entered.  

1. Is this a correct assumption?  

2. If yes, is this the expected behaviour of a browser for pages that are marked as do 
not cache?

3. If yes, is there any known mechanism to force the browser to not cache the POST 
data?

  Cheers,
  James

THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and 
is thus for use only by the intended recipient. If you received this in error, please 
contact the sender and delete the e-mail and its attachments from all computers. 


  -Original Message-
  From: Hubert Rabago [mailto:[EMAIL PROTECTED]
  Sent: 2004 January 14 21.57
  To: Struts Users Mailing List
  Subject: Re: Struts Validator overriding cache-control?
  
  
  The sequence you described is the expected behavior.
  Comments below.
  
  --- Brown, James [EMAIL PROTECTED] wrote:
   We have encountered a situation wherein it appears that the 
  server-side
   validation provided by the struts-validator and that of
   ValidatorForm.validate(...) appears to be overriding the 
  controller's nocache
   value.
   
   The scenario we have encountered is follows:
 1. user enters data on a page that is backed by a 
  subclass of ValidatorForm
 2. form is submitted but one of either server-side 
  validation for a required
   field (set via the struts validator plugin) or the 
  ValidatorForm.validate(...)
   method returns and ActionError.
  My guess is the form was submitted using METHOD=POST.
 3. the page is redisplayed with the appropriate error 
 message(s).
  This page is the result of a submitted form.
 4. the user corrects the form and submits.
 5. the subsequent (success) page is displayed.
 6. the user selects the browser's back button and 
  receives the IE Warning:
   Page has Expired warning/error.
  When the user selects the back button, he is trying to 
  redisplay the page shown
  in step 3, which can only be displayed by resubmitting the 
  form.  IE will not
  resubmit a form without informing the user, and therefore 
  shows this warning to
  tell the user.
 7. the user refreshes the page via the F5 key or the 
  refresh button, and the
   page as displayed in step 3 is redisplayed.
  This is expected because the form that was submitted in step 
  2 was resubmitted by
  IE to display the page requested by the user.
   
   Our controller is set to not cache any pages via:
 controller
   set-property property=nocache value=true/
 /controller
   
   The ValidatorForm/ActionForm's scope is also set to 
  request, thus the page
   should be displayed empty.
   
   This situation only occurs if the form is submitted with 
  data that fails
   server-side validation and the page is redisplayed.  In a 
  true success path,
   the page is displayed as desired - empty.
   
   Any ideas?
  
  Your user tried to redisplay the result of an errant form, 
  and so WILL get the
  page with the error message.  If you want to display an empty 
  form, perhaps to
  allow the user to enter another set of data, you can provide 
  a link which the
  user can follow for a fresh form, or display the form in step 
  5 along with your
  success message.
  
   
 Cheers,
 James
  
  
  
  __
  Do you Yahoo!?
  Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
  http://hotjobs.sweepstakes.yahoo.com/signingbonus
  
  
 -
  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]
 
 

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



Struts Validator overriding cache-control?

2004-01-14 Thread Brown, James
We have encountered a situation wherein it appears that the server-side validation 
provided by the struts-validator and that of ValidatorForm.validate(...) appears to be 
overriding the controller's nocache value.

The scenario we have encountered is follows:
  1. user enters data on a page that is backed by a subclass of ValidatorForm
  2. form is submitted but one of either server-side validation for a required field 
(set via the struts validator plugin) or the ValidatorForm.validate(...) method 
returns and ActionError.
  3. the page is redisplayed with the appropriate error message(s).
  4. the user corrects the form and submits.
  5. the subsequent (success) page is displayed.
  6. the user selects the browser's back button and receives the IE Warning: Page has 
Expired warning/error.
  7. the user refreshes the page via the F5 key or the refresh button, and the page as 
displayed in step 3 is redisplayed.

Our controller is set to not cache any pages via:
  controller
set-property property=nocache value=true/
  /controller

The ValidatorForm/ActionForm's scope is also set to request, thus the page should be 
displayed empty.

This situation only occurs if the form is submitted with data that fails server-side 
validation and the page is redisplayed.  In a true success path, the page is 
displayed as desired - empty.

Any ideas?

  Cheers,
  James

THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and 
is thus for use only by the intended recipient. If you received this in error, please 
contact the sender and delete the e-mail and its attachments from all computers. 

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



Re: Struts Validator overriding cache-control?

2004-01-14 Thread Hubert Rabago
The sequence you described is the expected behavior.
Comments below.

--- Brown, James [EMAIL PROTECTED] wrote:
 We have encountered a situation wherein it appears that the server-side
 validation provided by the struts-validator and that of
 ValidatorForm.validate(...) appears to be overriding the controller's nocache
 value.
 
 The scenario we have encountered is follows:
   1. user enters data on a page that is backed by a subclass of ValidatorForm
   2. form is submitted but one of either server-side validation for a required
 field (set via the struts validator plugin) or the ValidatorForm.validate(...)
 method returns and ActionError.
My guess is the form was submitted using METHOD=POST.
   3. the page is redisplayed with the appropriate error message(s).
This page is the result of a submitted form.
   4. the user corrects the form and submits.
   5. the subsequent (success) page is displayed.
   6. the user selects the browser's back button and receives the IE Warning:
 Page has Expired warning/error.
When the user selects the back button, he is trying to redisplay the page shown
in step 3, which can only be displayed by resubmitting the form.  IE will not
resubmit a form without informing the user, and therefore shows this warning to
tell the user.
   7. the user refreshes the page via the F5 key or the refresh button, and the
 page as displayed in step 3 is redisplayed.
This is expected because the form that was submitted in step 2 was resubmitted by
IE to display the page requested by the user.
 
 Our controller is set to not cache any pages via:
   controller
 set-property property=nocache value=true/
   /controller
 
 The ValidatorForm/ActionForm's scope is also set to request, thus the page
 should be displayed empty.
 
 This situation only occurs if the form is submitted with data that fails
 server-side validation and the page is redisplayed.  In a true success path,
 the page is displayed as desired - empty.
 
 Any ideas?

Your user tried to redisplay the result of an errant form, and so WILL get the
page with the error message.  If you want to display an empty form, perhaps to
allow the user to enter another set of data, you can provide a link which the
user can follow for a fresh form, or display the form in step 5 along with your
success message.

 
   Cheers,
   James



__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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



RE: Struts Validator overriding cache-control?

2004-01-14 Thread Brown, James
Thanks.  I was confused by the fact that the behaviour is different if the page is 
submitted without error.  In the without-error scenario, the re-post as the result 
of the refresh does not contain the form values that would logically be contained in 
the with-error scenario.  Now, I just need to work myself out of the corner I am in 
- I need to prevent the refresh from redisplaying this data which I think is darn near 
imposibble.

  Cheers,
  James

THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and 
is thus for use only by the intended recipient. If you received this in error, please 
contact the sender and delete the e-mail and its attachments from all computers. 


 -Original Message-
 From: Hubert Rabago [mailto:[EMAIL PROTECTED]
 Sent: 2004 January 14 21.57
 To: Struts Users Mailing List
 Subject: Re: Struts Validator overriding cache-control?
 
 
 The sequence you described is the expected behavior.
 Comments below.
 
 --- Brown, James [EMAIL PROTECTED] wrote:
  We have encountered a situation wherein it appears that the 
 server-side
  validation provided by the struts-validator and that of
  ValidatorForm.validate(...) appears to be overriding the 
 controller's nocache
  value.
  
  The scenario we have encountered is follows:
1. user enters data on a page that is backed by a 
 subclass of ValidatorForm
2. form is submitted but one of either server-side 
 validation for a required
  field (set via the struts validator plugin) or the 
 ValidatorForm.validate(...)
  method returns and ActionError.
 My guess is the form was submitted using METHOD=POST.
3. the page is redisplayed with the appropriate error message(s).
 This page is the result of a submitted form.
4. the user corrects the form and submits.
5. the subsequent (success) page is displayed.
6. the user selects the browser's back button and 
 receives the IE Warning:
  Page has Expired warning/error.
 When the user selects the back button, he is trying to 
 redisplay the page shown
 in step 3, which can only be displayed by resubmitting the 
 form.  IE will not
 resubmit a form without informing the user, and therefore 
 shows this warning to
 tell the user.
7. the user refreshes the page via the F5 key or the 
 refresh button, and the
  page as displayed in step 3 is redisplayed.
 This is expected because the form that was submitted in step 
 2 was resubmitted by
 IE to display the page requested by the user.
  
  Our controller is set to not cache any pages via:
controller
  set-property property=nocache value=true/
/controller
  
  The ValidatorForm/ActionForm's scope is also set to 
 request, thus the page
  should be displayed empty.
  
  This situation only occurs if the form is submitted with 
 data that fails
  server-side validation and the page is redisplayed.  In a 
 true success path,
  the page is displayed as desired - empty.
  
  Any ideas?
 
 Your user tried to redisplay the result of an errant form, 
 and so WILL get the
 page with the error message.  If you want to display an empty 
 form, perhaps to
 allow the user to enter another set of data, you can provide 
 a link which the
 user can follow for a fresh form, or display the form in step 
 5 along with your
 success message.
 
  
Cheers,
James
 
 
 
 __
 Do you Yahoo!?
 Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes
 http://hotjobs.sweepstakes.yahoo.com/signingbonus
 
 -
 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]