RE: Can anyone help with solving the "BACK" button problem, in th e browser?

2001-06-25 Thread Trieu, Danny



isn't 
the init pram of the Action servlet allow you to set no-cache on every out-going 
response?
 
like 
this:
 
    
  
nocache  
true    


  -Original Message-From: Eda Srinivasareddy Eda 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, June 25, 2001 5:09 
  AMTo: [EMAIL PROTECTED]Subject: Re: Can 
  anyone help with solving the "BACK" button problem, in th e 
  browser?
  Hi Smith 
  Could u please send the javascript code related to back button problem. 
  Thanks 
  Eda 
    Spencer Smith <[EMAIL PROTECTED]> wrote: 
  



That won't work.  I solved the problem 
using javascript.  Javascript doesn't cache like JSP pages does, so you 
can get around this problem using javascript.
 
If you want, I can send you the code I 
use.

  - Original Message - 
  From: 
  Thane Eisener 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Thursday, June 07, 2001 10:12 
      AM
  Subject: RE: Can anyone help with 
      solving the "BACK" button problem, in th e browser?
  
  Oops, I guess I should test before I post. It looks like 
  newer browsers don't support this as a META tag only as a 
  header.
  I added the following to one of my action classes and the 
  perform() method was called when I pressed 'Back': 
  response.addHeader("Pragma","no-cache"); response.addHeader("Cache-control","no-cache"); 
  Hope it helps, Thane 
  -Original Message- From: 
  Peter Alfors [mailto:[EMAIL PROTECTED]] 
  Sent: Thursday, June 07, 2001 11:35 AM To: [EMAIL PROTECTED] Subject: 
  Re: Can anyone help with solving the "BACK" button problem, in 
  th e browser? 
  Thane , 
  I am using:     
   in 
  my header, and my action is not re-executed when I use the browser 
  back button. Is there another 
  option I should be using? 
  thanks,     
  Pete 
  Thane Eisener wrote: 
  > > > I seem to recall a META tag called something like 
  pragma-no-cache that > you can embed in your 
  page which will force the page to reload (not > 
  just display a snapshot). This should enable handling the situation 
  in > scriptlets or your action class. 
  > > -Original 
  Message- > From: Peter Alfors [mailto:[EMAIL PROTECTED]] 
  > Sent: Thursday, June 07, 2001 9:52 AM 
  > To: [EMAIL PROTECTED] > Subject: Re: Can anyone help with solving the "BACK" button 
  problem, > in > the 
  browser? > > 
  Dependin! g on which browser you use, and the data on the page, the 
  back > button > may 
  cause (or ask) the page to reload. > However, 
  some browsers (like IE) only display a snapshot of what the 
  > last page > rendered 
  to. > Therefore, you cannot use scriptlets or 
  the action class.  However, > you are 
  able > to kick-off javascript. > If you can gaurantee that your users will have javascript 
  enabled, you > can write > a simple test to see if this page was already displayed to the 
  user. > You could > 
  check a flag (hidden field) when the page loads.  If the flag is 
  true, > then use >! 
  ; the javascript to reload to your desired page. > > HTH, > Pete > > "Dudley Butt@i-Commerce" 
  wrote: > > > 
  Please help, > > > > When the user pushes the back button, I want the page to 
  redirect or > refresh > > to a different page, please, any ideas? > > > > Thanx guys and 
  gals > > Dudley 
  
  
  
  Do You Yahoo!?Get personalized email addresses from Yahoo! Mail - 
  only $35 a year!http://personal.mail.yahoo.com/


Re: Can anyone help with solving the "BACK" button problem, in th e browser?

2001-06-25 Thread Eda Srinivasareddy Eda
 Hi Smith
Could u please send the javascript code related to back button problem.
Thanks
Eda
  Spencer Smith <[EMAIL PROTECTED]> wrote: 




That won't work.  I solved the problem using javascript.  Javascript doesn't cache like JSP pages does, so you can get around this problem using javascript.
 
If you want, I can send you the code I use.

- Original Message - 
From: Thane Eisener 
To: '[EMAIL PROTECTED]' 
Sent: Thursday, June 07, 2001 10:12 AM
Subject: RE: Can anyone help with solving the "BACK" button problem, in th e browser?

Oops, I guess I should test before I post. It looks like newer browsers don't support this as a META tag only as a header.
I added the following to one of my action classes and the perform() method was called when I pressed 'Back': 
response.addHeader("Pragma","no-cache"); response.addHeader("Cache-control","no-cache"); 
Hope it helps, Thane 
-Original Message- From: Peter Alfors [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 07, 2001 11:35 AM To: [EMAIL PROTECTED] Subject: Re: Can anyone help with solving the "BACK" button problem, in th e browser? 
Thane , 
I am using:      in my header, and my action is not re-executed when I use the browser back button. Is there another option I should be using? 
thanks,     Pete 
Thane Eisener wrote: 
> > > I seem to recall a META tag called something like pragma-no-cache that > you can embed in your page which will force the page to reload (not > just display a snapshot). This should enable handling the situation in > scriptlets or your action class. > > -Original Message- > From: Peter Alfors [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 07, 2001 9:52 AM > To: [EMAIL PROTECTED] > Subject: Re: Can anyone help with solving the "BACK" button problem, > in > the browser? > > Depending on which browser you use, and the data on the page, the back > button > may cause (or ask) the page to reload. > However, some browsers (like IE) only display a snapshot of what the > last page > rendered to. > Therefore, you cannot use scriptlets or the action class.  However, > you are able > to kick-off javascript. > If you can gaurantee that your users will have javascript enabled, you > can write > a simple test to see if this page was already displayed to the user. > You could > check a flag (hidden field) when the page loads.  If the flag is true, > then use > the javascript to reload to your desired page. > > HTH, > Pete > > "Dudley Butt@i-Commerce" wrote: > > > Please help, > > > > When the user pushes the back button, I want the page to redirect or > refresh > > to a different page, please, any ideas? > > > > Thanx guys and gals > > Dudley Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!http://personal.mail.yahoo.com/

RE: Can anyone help with solving the "BACK" button problem, in th e browser?

2001-06-10 Thread Dudley [EMAIL PROTECTED]

thanx, appreciate the suggestion

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 10, 2001 1:47 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Can anyone help with solving the "BACK" button problem, in
th e browser?




On Fri, 8 Jun 2001, Dudley Butt@i-Commerce wrote:

> yes, but this is a form that is being filled in like a wizard type of
thing,
> i need the form to be session
> any ideas, for an alternative?
> 

The alternative approach is to have *all* of the input fields for the
entire wizard included on every page -- but the ones you are not
displaying on the current page would be created with  instead
of  or whatever.

Craig



RE: Can anyone help with solving the "BACK" button problem, in th e browser?

2001-06-09 Thread Craig R. McClanahan



On Fri, 8 Jun 2001, Dudley Butt@i-Commerce wrote:

> yes, but this is a form that is being filled in like a wizard type of thing,
> i need the form to be session
> any ideas, for an alternative?
> 

The alternative approach is to have *all* of the input fields for the
entire wizard included on every page -- but the ones you are not
displaying on the current page would be created with  instead
of  or whatever.

Craig




RE: Can anyone help with solving the "BACK" button problem, in th e browser?

2001-06-08 Thread Dudley [EMAIL PROTECTED]

yes, but this is a form that is being filled in like a wizard type of thing,
i need the form to be session
any ideas, for an alternative?


-Original Message-
From: William Jaynes [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 08, 2001 1:40 PM
To: [EMAIL PROTECTED]
Subject: Re: Can anyone help with solving the "BACK" button problem, in
th e browser?


Just a comment... Looks like your method of checking the RefreshOption
property will only work if the scope of the ActionForm is "session".
That's ok if one doesn't mind the use of resources.

- Original Message -
From: "Dudley Butt@i-Commerce" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 08, 2001 5:34 AM
Subject: RE: Can anyone help with solving the "BACK" button problem, in
th e browser?


> well, this will blow all your socks off.
> I got something to work, and remaining in line with my "REDUCE THE
> JAVASCRIPT" policy
> here is what i did...
>
> I just plugged some code into my actionhandler to evaluate a state
property
> on my actionform. If it was a certain state i either perform usual
> processing or just by pass the processing and show the JSP which gets
> rebuilt anyways...
>
> great!!
>
> public ActionHandlerResponse executeAction(ActionMapping mapping,
> ActionForm form, HttpServletRequest request){
>
> System.out.println("In " + this.getClass());
> actionFormObject = (Vat201ReturnActionForm)form;
> aRequest = request;
> ActionErrors errors = null;
> if (actionFormObject.getRefreshOption()){   // IF THIS IS TRUE
DONT
> ALLOW ANY PROCESSING JUST REBUILD JSP
> // THIS boolean GETS SET AFTER FIRST TIME PROCESSING
> return new
> ActionHandlerResponse(errors,mapping.findForward("success"));
> }
> errors = doFieldValidation();
> if (errors != null) {
> actionFormObject.setAction("Edit");
> return new ActionHandlerResponse(errors, new
> ActionForward(mapping.getInput()));
> }
> else {
> errors = doReturnUpdate();
> if (errors == null){
>
> return new
> ActionHandlerResponse(errors,mapping.findForward("success"));
> }
> else {
> actionFormObject.setAction("Edit");
> return new ActionHandlerResponse(errors, new
> ActionForward(mapping.getInput()));
> }
> }
> //return new ActionHandlerResponse(errors,
> mapping.findForward("mainMenu"));
> }
>
>
>
>



Re: Can anyone help with solving the "BACK" button problem, in th e browser?

2001-06-08 Thread Jeff Trent

Another approach I would recommend to solve this problem (haven't tried it
though), would be to check the request referer.  If it is an empty string
then the user either clicked refresh or they typed in the URL into the
address field on their browser.


- Original Message -
From: "William Jaynes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 08, 2001 7:40 AM
Subject: Re: Can anyone help with solving the "BACK" button problem, in th e
browser?


> Just a comment... Looks like your method of checking the RefreshOption
> property will only work if the scope of the ActionForm is "session".
> That's ok if one doesn't mind the use of resources.
>
> - Original Message -
> From: "Dudley Butt@i-Commerce" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 08, 2001 5:34 AM
> Subject: RE: Can anyone help with solving the "BACK" button problem, in
> th e browser?
>
>
> > well, this will blow all your socks off.
> > I got something to work, and remaining in line with my "REDUCE THE
> > JAVASCRIPT" policy
> > here is what i did...
> >
> > I just plugged some code into my actionhandler to evaluate a state
> property
> > on my actionform. If it was a certain state i either perform usual
> > processing or just by pass the processing and show the JSP which gets
> > rebuilt anyways...
> >
> > great!!
> >
> > public ActionHandlerResponse executeAction(ActionMapping mapping,
> > ActionForm form, HttpServletRequest request){
> >
> > System.out.println("In " + this.getClass());
> > actionFormObject = (Vat201ReturnActionForm)form;
> > aRequest = request;
> > ActionErrors errors = null;
> > if (actionFormObject.getRefreshOption()){   // IF THIS IS TRUE
> DONT
> > ALLOW ANY PROCESSING JUST REBUILD JSP
> > // THIS boolean GETS SET AFTER FIRST TIME PROCESSING
> > return new
> > ActionHandlerResponse(errors,mapping.findForward("success"));
> > }
> > errors = doFieldValidation();
> > if (errors != null) {
> > actionFormObject.setAction("Edit");
> > return new ActionHandlerResponse(errors, new
> > ActionForward(mapping.getInput()));
> > }
> > else {
> > errors = doReturnUpdate();
> > if (errors == null){
> >
> > return new
> > ActionHandlerResponse(errors,mapping.findForward("success"));
> > }
> > else {
> > actionFormObject.setAction("Edit");
> > return new ActionHandlerResponse(errors, new
> > ActionForward(mapping.getInput()));
> > }
> > }
> > file://return new ActionHandlerResponse(errors,
> > mapping.findForward("mainMenu"));
> > }
> >
> >
> >
> >
>
>




Re: Can anyone help with solving the "BACK" button problem, in th e browser?

2001-06-08 Thread William Jaynes

Just a comment... Looks like your method of checking the RefreshOption
property will only work if the scope of the ActionForm is "session".
That's ok if one doesn't mind the use of resources.

- Original Message -
From: "Dudley Butt@i-Commerce" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 08, 2001 5:34 AM
Subject: RE: Can anyone help with solving the "BACK" button problem, in
th e browser?


> well, this will blow all your socks off.
> I got something to work, and remaining in line with my "REDUCE THE
> JAVASCRIPT" policy
> here is what i did...
>
> I just plugged some code into my actionhandler to evaluate a state
property
> on my actionform. If it was a certain state i either perform usual
> processing or just by pass the processing and show the JSP which gets
> rebuilt anyways...
>
> great!!
>
> public ActionHandlerResponse executeAction(ActionMapping mapping,
> ActionForm form, HttpServletRequest request){
>
> System.out.println("In " + this.getClass());
> actionFormObject = (Vat201ReturnActionForm)form;
> aRequest = request;
> ActionErrors errors = null;
> if (actionFormObject.getRefreshOption()){   // IF THIS IS TRUE
DONT
> ALLOW ANY PROCESSING JUST REBUILD JSP
> // THIS boolean GETS SET AFTER FIRST TIME PROCESSING
> return new
> ActionHandlerResponse(errors,mapping.findForward("success"));
> }
> errors = doFieldValidation();
> if (errors != null) {
> actionFormObject.setAction("Edit");
> return new ActionHandlerResponse(errors, new
> ActionForward(mapping.getInput()));
> }
> else {
> errors = doReturnUpdate();
> if (errors == null){
>
> return new
> ActionHandlerResponse(errors,mapping.findForward("success"));
> }
> else {
> actionFormObject.setAction("Edit");
> return new ActionHandlerResponse(errors, new
> ActionForward(mapping.getInput()));
> }
> }
> //return new ActionHandlerResponse(errors,
> mapping.findForward("mainMenu"));
> }
>
>
>
>




RE: Can anyone help with solving the "BACK" button problem, in th e browser?

2001-06-08 Thread Dudley [EMAIL PROTECTED]
Title: RE: Can anyone help with solving the "BACK" button problem, in th e browser?



the 
solution i posted means that the user can push the BACK button, but we have full 
control via the actionhandler, as to how much processing we will allow the user 
to perform, simply just by evaluating some previously set 
form properties
[Dudley Butt@i-Commerce] 
 -Original 
Message-From: Spencer Smith 
[mailto:[EMAIL PROTECTED]]Sent: Thursday, June 07, 2001 7:44 
PMTo: [EMAIL PROTECTED]Subject: Re: Can 
anyone help with solving the "BACK" button problem, in th e 
browser?

  That won't work.  I solved the problem using 
  javascript.  Javascript doesn't cache like JSP pages does, so you can get 
  around this problem using javascript.
   
  If you want, I can send you the code I 
  use.
  
- Original Message - 
From: 
Thane Eisener 
To: '[EMAIL PROTECTED]' 

Sent: Thursday, June 07, 2001 10:12 
AM
    Subject: RE: Can anyone help with 
    solving the "BACK" button problem, in th e browser?

Oops, I guess I should test before I post. It looks like 
newer browsers don't support this as a META tag only as a header.
I added the following to one of my action classes and the 
perform() method was called when I pressed 'Back': 
response.addHeader("Pragma","no-cache"); response.addHeader("Cache-control","no-cache"); 
Hope it helps, Thane 
-Original Message- From: 
Peter Alfors [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, June 07, 2001 11:35 AM To: [EMAIL PROTECTED] Subject: 
Re: Can anyone help with solving the "BACK" button problem, in 
th e browser? 
Thane , 
I am using:     
 in 
my header, and my action is not re-executed when I use the browser 
back button. Is there another 
option I should be using? 
thanks,     
Pete 
Thane Eisener wrote: 
> > > I seem to recall a META tag called something like 
pragma-no-cache that > you can embed in your page 
which will force the page to reload (not > just 
display a snapshot). This should enable handling the situation in 
> scriptlets or your action class. > > -Original Message- 
> From: Peter Alfors [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, June 07, 2001 9:52 AM > To: [EMAIL PROTECTED] > 
Subject: Re: Can anyone help with solving the "BACK" button problem, 
> in > the browser? 
> > Depending on which 
browser you use, and the data on the page, the back > button > may cause (or ask) the page 
to reload. > However, some browsers (like IE) 
only display a snapshot of what the > last 
page > rendered to. > 
Therefore, you cannot use scriptlets or the action class.  
However, > you are able > to kick-off javascript. > If you can 
gaurantee that your users will have javascript enabled, you > can write > a simple test to see if 
this page was already displayed to the user. > 
You could > check a flag (hidden field) when the 
page loads.  If the flag is true, > then 
use > the javascript to reload to your desired 
page. > > HTH, 
> Pete > > "Dudley Butt@i-Commerce" 
wrote: > > > Please 
help, > > > > 
When the user pushes the back button, I want the page to redirect or 
> refresh > > to a 
different page, please, any ideas? > > 
> > Thanx guys and gals > 
> Dudley 


RE: Can anyone help with solving the "BACK" button problem, in th e browser?

2001-06-08 Thread Dudley [EMAIL PROTECTED]
Title: RE: Can anyone help with solving the "BACK" button problem, in th e browser?



well, 
this will blow all your socks off.
I got 
something to work, and remaining in line with my "REDUCE THE JAVASCRIPT" 
policy
here 
is what i did...
 
I just 
plugged some code into my actionhandler to evaluate a state property on my 
actionform. If it was a certain state i either perform usual processing or just 
by pass the processing and show the JSP which gets rebuilt 
anyways...
 
great!!
 
    public ActionHandlerResponse 
executeAction(ActionMapping mapping, ActionForm form, HttpServletRequest 
request){
 
    System.out.println("In " + 
this.getClass());    actionFormObject 
= (Vat201ReturnActionForm)form;    
aRequest = request;    ActionErrors 
errors = null;    if 
(actionFormObject.getRefreshOption()){   // IF THIS IS TRUE DONT ALLOW 
ANY PROCESSING JUST REBUILD JSP
// 
THIS boolean GETS SET AFTER FIRST TIME PROCESSING 
    
return new 
ActionHandlerResponse(errors,mapping.findForward("success"));    
}    errors = 
doFieldValidation();    if (errors != 
null) {    
actionFormObject.setAction("Edit");    
return new ActionHandlerResponse(errors, new 
ActionForward(mapping.getInput()));    
}    else 
{    errors = 
doReturnUpdate();    
if (errors == null){
 
    
return new 
ActionHandlerResponse(errors,mapping.findForward("success"));    
}    else 
{    
actionFormObject.setAction("Edit");    
return new ActionHandlerResponse(errors, new 
ActionForward(mapping.getInput()));    
}    
}    //return new 
ActionHandlerResponse(errors, 
mapping.findForward("mainMenu"));    
}
 
 

  -Original Message-From: Spencer Smith 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, June 07, 2001 7:44 
  PMTo: [EMAIL PROTECTED]Subject: Re: Can 
  anyone help with solving the "BACK" button problem, in th e 
  browser?
  That won't work.  I solved the problem using 
  javascript.  Javascript doesn't cache like JSP pages does, so you can get 
  around this problem using javascript.
   
  If you want, I can send you the code I 
  use.
  
- Original Message - 
From: 
Thane Eisener 
    To: '[EMAIL PROTECTED]' 
    
Sent: Thursday, June 07, 2001 10:12 
AM
Subject: RE: Can anyone help with 
solving the "BACK" button problem, in th e browser?

Oops, I guess I should test before I post. It looks like 
newer browsers don't support this as a META tag only as a header.
I added the following to one of my action classes and the 
perform() method was called when I pressed 'Back': 
response.addHeader("Pragma","no-cache"); response.addHeader("Cache-control","no-cache"); 
Hope it helps, Thane 
    -----Original Message- From: 
Peter Alfors [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, June 07, 2001 11:35 AM To: [EMAIL PROTECTED] Subject: 
Re: Can anyone help with solving the "BACK" button problem, in 
th e browser? 
Thane , 
I am using:     
 in 
my header, and my action is not re-executed when I use the browser 
back button. Is there another 
option I should be using? 
thanks,     
Pete 
Thane Eisener wrote: 
> > > I seem to recall a META tag called something like 
pragma-no-cache that > you can embed in your page 
which will force the page to reload (not > just 
display a snapshot). This should enable handling the situation in 
> scriptlets or your action class. > > -Original Message- 
> From: Peter Alfors [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, June 07, 2001 9:52 AM > To: [EMAIL PROTECTED] > 
Subject: Re: Can anyone help with solving the "BACK" button problem, 
> in > the browser? 
> > Depending on which 
browser you use, and the data on the page, the back > button > may cause (or ask) the page 
to reload. > However, some browsers (like IE) 
only display a snapshot of what the > last 
page > rendered to. > 
Therefore, you cannot use scriptlets or the action class.  
However, > you are able > to kick-off javascript. > If you can 
gaurantee that your users will have javascript enabled, you > can write > a simple test to see if 
this page was already displayed to the user. > 
You could > check a flag (hidden field) when the 
page loads.  If the flag is true, > then 
use > the javascript to reload to your desired 
page. > > HTH, 
> Pete > > "Dudley Butt@i-Commerce" 
wrote: > > > Please 
help, > > > > 
When the user pushes the back button, I want the page to redirect or 
> refresh > > to a 
different page, please, any ideas? > > 
> > Thanx guys and gals > 
> Dudley 


Re: Can anyone help with solving the "BACK" button problem, in th e browser?

2001-06-07 Thread Spencer Smith
Title: RE: Can anyone help with solving the "BACK" button problem, in th e browser?



That won't work.  I solved the problem using 
javascript.  Javascript doesn't cache like JSP pages does, so you can get 
around this problem using javascript.
 
If you want, I can send you the code I 
use.

  - Original Message - 
  From: 
  Thane Eisener 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Thursday, June 07, 2001 10:12 
  AM
  Subject: RE: Can anyone help with solving 
  the "BACK" button problem, in th e browser?
  
  Oops, I guess I should test before I post. It looks like newer 
  browsers don't support this as a META tag only as a header.
  I added the following to one of my action classes and the 
  perform() method was called when I pressed 'Back': 
  response.addHeader("Pragma","no-cache"); response.addHeader("Cache-control","no-cache"); 
  Hope it helps, Thane 
  -Original Message- From: Peter 
  Alfors [mailto:[EMAIL PROTECTED]] 
  Sent: Thursday, June 07, 2001 11:35 AM To: [EMAIL PROTECTED] Subject: Re: 
  Can anyone help with solving the "BACK" button problem, in th e browser? 
  Thane , 
  I am using:     
   in my 
  header, and my action is not re-executed when I use the browser 
  back button. Is there another option 
  I should be using? 
  thanks,     Pete 
  
  Thane Eisener wrote: 
  > > > 
  I seem to recall a META tag called something like pragma-no-cache that 
  > you can embed in your page which will force the page to 
  reload (not > just display a snapshot). This should 
  enable handling the situation in > scriptlets or 
  your action class. > > 
  -Original Message- > From: Peter Alfors [mailto:[EMAIL PROTECTED]] 
  > Sent: Thursday, June 07, 2001 9:52 AM > To: [EMAIL PROTECTED] > 
  Subject: Re: Can anyone help with solving the "BACK" button problem, 
  > in > the browser? 
  > > Depending on which browser 
  you use, and the data on the page, the back > 
  button > may cause (or ask) the page to 
  reload. > However, some browsers (like IE) only 
  display a snapshot of what the > last page 
  > rendered to. > Therefore, you 
  cannot use scriptlets or the action class.  However, > you are able > to kick-off 
  javascript. > If you can gaurantee that your users 
  will have javascript enabled, you > can 
  write > a simple test to see if this page was 
  already displayed to the user. > You could 
  > check a flag (hidden field) when the page loads.  
  If the flag is true, > then use > the javascript to reload to your desired page. > > HTH, > Pete > 
  > "Dudley Butt@i-Commerce" wrote: > > > Please help, > > > > When the user pushes the 
  back button, I want the page to redirect or > 
  refresh > > to a different page, please, any 
  ideas? > > > > 
  Thanx guys and gals > > Dudley 



Re: Can anyone help with solving the "BACK" button problem, in th e browser?

2001-06-07 Thread Peter Alfors

Looks like you can also set the Servlet init param "nocache" to true,
and struts will automatically set the response headers for you.

Thanks,
Pete

Thane Eisener wrote:

>
>
> Oops, I guess I should test before I post. It looks like newer
> browsers don't support this as a META tag only as a header.
>
> I added the following to one of my action classes and the perform()
> method was called when I pressed 'Back':
>
> response.addHeader("Pragma","no-cache");
> response.addHeader("Cache-control","no-cache");
>
> Hope it helps,
> Thane
>
> -Original Message-
> From: Peter Alfors [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 07, 2001 11:35 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Can anyone help with solving the "BACK" button problem,
> in
> th e browser?
>
> Thane ,
>
> I am using:
> 
> in my header, and my action is not re-executed when I use the browser
> back button.
> Is there another option I should be using?
>
> thanks,
> Pete
>
> Thane Eisener wrote:
>
> >
> >
> > I seem to recall a META tag called something like pragma-no-cache
> that
> > you can embed in your page which will force the page to reload (not
> > just display a snapshot). This should enable handling the situation
> in
> > scriptlets or your action class.
> >
> > -Original Message-
> > From: Peter Alfors [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, June 07, 2001 9:52 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Can anyone help with solving the "BACK" button problem,
>
> > in
> > the browser?
> >
> > Depending on which browser you use, and the data on the page, the
> back
> > button
> > may cause (or ask) the page to reload.
> > However, some browsers (like IE) only display a snapshot of what the
>
> > last page
> > rendered to.
> > Therefore, you cannot use scriptlets or the action class.  However,
> > you are able
> > to kick-off javascript.
> > If you can gaurantee that your users will have javascript enabled,
> you
> > can write
> > a simple test to see if this page was already displayed to the user.
>
> > You could
> > check a flag (hidden field) when the page loads.  If the flag is
> true,
> > then use
> > the javascript to reload to your desired page.
> >
> > HTH,
> > Pete
> >
> > "Dudley Butt@i-Commerce" wrote:
> >
> > > Please help,
> > >
> > > When the user pushes the back button, I want the page to redirect
> or
> > refresh
> > > to a different page, please, any ideas?
> > >
> > > Thanx guys and gals
> > > Dudley




RE: Can anyone help with solving the "BACK" button problem, in th e browser?

2001-06-07 Thread Thane Eisener
Title: RE: Can anyone help with solving the "BACK" button problem, in th e  browser?





Oops, I guess I should test before I post. It looks like newer browsers don't support this as a META tag only as a header.

I added the following to one of my action classes and the perform() method was called when I pressed 'Back':


response.addHeader("Pragma","no-cache");
response.addHeader("Cache-control","no-cache");


Hope it helps,
Thane


-Original Message-
From: Peter Alfors [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 07, 2001 11:35 AM
To: [EMAIL PROTECTED]
Subject: Re: Can anyone help with solving the "BACK" button problem, in
th e browser?



Thane ,


I am using:
    
in my header, and my action is not re-executed when I use the browser
back button.
Is there another option I should be using?


thanks,
    Pete



Thane Eisener wrote:


>
>
> I seem to recall a META tag called something like pragma-no-cache that
> you can embed in your page which will force the page to reload (not
> just display a snapshot). This should enable handling the situation in
> scriptlets or your action class.
>
> -Original Message-
> From: Peter Alfors [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 07, 2001 9:52 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Can anyone help with solving the "BACK" button problem,
> in
> the browser?
>
> Depending on which browser you use, and the data on the page, the back
> button
> may cause (or ask) the page to reload.
> However, some browsers (like IE) only display a snapshot of what the
> last page
> rendered to.
> Therefore, you cannot use scriptlets or the action class.  However,
> you are able
> to kick-off javascript.
> If you can gaurantee that your users will have javascript enabled, you
> can write
> a simple test to see if this page was already displayed to the user.
> You could
> check a flag (hidden field) when the page loads.  If the flag is true,
> then use
> the javascript to reload to your desired page.
>
> HTH,
> Pete
>
> "Dudley Butt@i-Commerce" wrote:
>
> > Please help,
> >
> > When the user pushes the back button, I want the page to redirect or
> refresh
> > to a different page, please, any ideas?
> >
> > Thanx guys and gals
> > Dudley





RE: Can anyone help with solving the "BACK" button problem, in th e browser?

2001-06-07 Thread Thane Eisener
Title: RE: Can anyone help with solving the "BACK" button problem, in th e  browser?





Try putting both of the following in the  element of your page. Please let us know if it works.




From the HTTP1.1 spec:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.32
14.32 Pragma
The Pragma general-header field is used to include implementation- specific directives that might apply to any recipient along the request/response chain. All pragma directives specify optional behavior from the viewpoint of the protocol; however, some systems MAY require that behavior be consistent with the directives. 

   Pragma    = "Pragma" ":" 1#pragma-directive
   pragma-directive  = "no-cache" | extension-pragma
   extension-pragma  = token [ "=" ( token | quoted-string ) ]


When the no-cache directive is present in a request message, an application SHOULD forward the request toward the origin server even if it has a cached copy of what is being requested. This pragma directive has the same semantics as the no-cache cache-directive (see section 14.9) and is defined here for backward compatibility with HTTP/1.0. Clients SHOULD include both header fields when a no-cache request is sent to a server not known to be HTTP/1.1 compliant. 

Pragma directives MUST be passed through by a proxy or gateway application, regardless of their significance to that application, since the directives might be applicable to all recipients along the request/response chain. It is not possible to specify a pragma for a specific recipient; however, any pragma directive not relevant to a recipient SHOULD be ignored by that recipient. 

HTTP/1.1 caches SHOULD treat "Pragma: no-cache" as if the client had sent "Cache-Control: no-cache". No new Pragma directives will be defined in HTTP. 

  Note: because the meaning of "Pragma: no-cache as a response
  header field is not actually specified, it does not provide a
  reliable replacement for "Cache-Control: no-cache" in a response



-Original Message-
From: Peter Alfors [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 07, 2001 11:35 AM
To: [EMAIL PROTECTED]
Subject: Re: Can anyone help with solving the "BACK" button problem, in
th e browser?



Thane ,


I am using:
    
in my header, and my action is not re-executed when I use the browser
back button.
Is there another option I should be using?


thanks,
    Pete



Thane Eisener wrote:


>
>
> I seem to recall a META tag called something like pragma-no-cache that
> you can embed in your page which will force the page to reload (not
> just display a snapshot). This should enable handling the situation in
> scriptlets or your action class.
>
> -Original Message-
> From: Peter Alfors [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 07, 2001 9:52 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Can anyone help with solving the "BACK" button problem,
> in
> the browser?
>
> Depending on which browser you use, and the data on the page, the back
> button
> may cause (or ask) the page to reload.
> However, some browsers (like IE) only display a snapshot of what the
> last page
> rendered to.
> Therefore, you cannot use scriptlets or the action class.  However,
> you are able
> to kick-off javascript.
> If you can gaurantee that your users will have javascript enabled, you
> can write
> a simple test to see if this page was already displayed to the user.
> You could
> check a flag (hidden field) when the page loads.  If the flag is true,
> then use
> the javascript to reload to your desired page.
>
> HTH,
> Pete
>
> "Dudley Butt@i-Commerce" wrote:
>
> > Please help,
> >
> > When the user pushes the back button, I want the page to redirect or
> refresh
> > to a different page, please, any ideas?
> >
> > Thanx guys and gals
> > Dudley





Re: Can anyone help with solving the "BACK" button problem, in th e browser?

2001-06-07 Thread Peter Alfors

Thane ,

I am using:

in my header, and my action is not re-executed when I use the browser
back button.
Is there another option I should be using?

thanks,
Pete


Thane Eisener wrote:

>
>
> I seem to recall a META tag called something like pragma-no-cache that
> you can embed in your page which will force the page to reload (not
> just display a snapshot). This should enable handling the situation in
> scriptlets or your action class.
>
> -Original Message-
> From: Peter Alfors [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 07, 2001 9:52 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Can anyone help with solving the "BACK" button problem,
> in
> the browser?
>
> Depending on which browser you use, and the data on the page, the back
> button
> may cause (or ask) the page to reload.
> However, some browsers (like IE) only display a snapshot of what the
> last page
> rendered to.
> Therefore, you cannot use scriptlets or the action class.  However,
> you are able
> to kick-off javascript.
> If you can gaurantee that your users will have javascript enabled, you
> can write
> a simple test to see if this page was already displayed to the user.
> You could
> check a flag (hidden field) when the page loads.  If the flag is true,
> then use
> the javascript to reload to your desired page.
>
> HTH,
> Pete
>
> "Dudley Butt@i-Commerce" wrote:
>
> > Please help,
> >
> > When the user pushes the back button, I want the page to redirect or
> refresh
> > to a different page, please, any ideas?
> >
> > Thanx guys and gals
> > Dudley


begin:vcard 
n:;
x-mozilla-html:FALSE
org:http://www.irista.com/logo/irista.gif";>Bringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



RE: Can anyone help with solving the "BACK" button problem, in th e browser?

2001-06-07 Thread Thane Eisener
Title: RE: Can anyone help with solving the "BACK" button problem, in the  browser?





I seem to recall a META tag called something like pragma-no-cache that you can embed in your page which will force the page to reload (not just display a snapshot). This should enable handling the situation in scriptlets or your action class.


-Original Message-
From: Peter Alfors [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 07, 2001 9:52 AM
To: [EMAIL PROTECTED]
Subject: Re: Can anyone help with solving the "BACK" button problem, in
the browser?



Depending on which browser you use, and the data on the page, the back button
may cause (or ask) the page to reload.
However, some browsers (like IE) only display a snapshot of what the last page
rendered to.
Therefore, you cannot use scriptlets or the action class.  However, you are able
to kick-off javascript.
If you can gaurantee that your users will have javascript enabled, you can write
a simple test to see if this page was already displayed to the user.  You could
check a flag (hidden field) when the page loads.  If the flag is true, then use
the javascript to reload to your desired page.


HTH,
    Pete


"Dudley Butt@i-Commerce" wrote:


> Please help,
>
> When the user pushes the back button, I want the page to redirect or refresh
> to a different page, please, any ideas?
>
> Thanx guys and gals
> Dudley