You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Shah, Shrihas (OFT)" <Sh...@oft.state.ny.us> on 2003/12/17 19:55:25 UTC

Question about back button on forward.

Hi All:

 

In IE when user hits back button then I want to forward user to my main
page. I want to do this in reset method of the form. How can I

 

1)    forward using request object to forward to main page.

2)    Or redirect to main page

 

Note: At this time I am not executing action class. So I cannot return
mapping. I am just in form. And I want to 

Forward to a specific page.

 

Any hints? Help??

 

Thanks.

 

Shrihas Shah
NYS Office for Technology
shrihas.shah@oft.state.ny.us
Phone (518) 408-2382
Fax (518) 473-3389
(US Postal Service Regular Mail Address)
State Capitol ESP, PO Box 2062
Albany, NY 12220-0062
(Parcel Post/Overnight and Interagency Mail Address)
Empire State Plaza
Swan St., Core 4, 1st Floor
Albany, NY 12223

 


Re: Question about back button on forward.

Posted by Shrihas Shah <sh...@oft.state.ny.us>.
Hi Khalid:

Thanks for your reply. I just found out some info. If I want to 
force to send request upon the hitting back button I can put 
following lines in my jsp and it does force back the request to 
server.

<% response.setHeader("Expires","0");response.setHeader("Cache-
Control","no-cache");%>

Thanks for your input. I appreciate it.

Shrihas.

--- In struts@yahoogroups.com, "Khalid K." <gr...@m...> wrote:
> This is an age old questions. There are various javascript 'hacks' 
around. I 
> suggest google the following: "javascript back button" 
> 
> the problem is that when you click on "back button" no server 
request is made, 
> the catched page froom "history.back()" (i think that is the 
method) is 
> displayed.  So java can't help you on that.
> 
> Khalid
> 
> 
> > Hi All:
> > 
> >  
> > 
> > In IE when user hits back button then I want to forward user to 
my main
> > page. I want to do this in reset method of the form. How can I
> > 
> >  
> > 
> > 1)    forward using request object to forward to main page.
> > 
> > 2)    Or redirect to main page
> > 
> >  
> > 
> > Note: At this time I am not executing action class. So I cannot 
return
> > mapping. I am just in form. And I want to 
> > 
> > Forward to a specific page.
> > 
> >  
> > 
> > Any hints? Help??
> > 
> >  
> > 
> > Thanks.
> > 
> >  
> > 
> > Shrihas Shah
> > NYS Office for Technology
> > shrihas.shah@o...
> > Phone (518) 408-2382
> > Fax (518) 473-3389
> > (US Postal Service Regular Mail Address)
> > State Capitol ESP, PO Box 2062
> > Albany, NY 12220-0062
> > (Parcel Post/Overnight and Interagency Mail Address)
> > Empire State Plaza
> > Swan St., Core 4, 1st Floor
> > Albany, NY 12223
> > 
> >  
> > 
> > 
> 
> 
> -- 
> Khalid K.
> 
> -------------------------------------------------------------------
--
> To unsubscribe, e-mail: struts-user-unsubscribe@j...
> For additional commands, e-mail: struts-user-help@j...


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Question about back button on forward.

Posted by "Khalid K." <gr...@maikada.com>.
This is an age old questions. There are various javascript 'hacks' around. I 
suggest google the following: "javascript back button" 

the problem is that when you click on "back button" no server request is made, 
the catched page froom "history.back()" (i think that is the method) is 
displayed.  So java can't help you on that.

Khalid


> Hi All:
> 
>  
> 
> In IE when user hits back button then I want to forward user to my main
> page. I want to do this in reset method of the form. How can I
> 
>  
> 
> 1)    forward using request object to forward to main page.
> 
> 2)    Or redirect to main page
> 
>  
> 
> Note: At this time I am not executing action class. So I cannot return
> mapping. I am just in form. And I want to 
> 
> Forward to a specific page.
> 
>  
> 
> Any hints? Help??
> 
>  
> 
> Thanks.
> 
>  
> 
> Shrihas Shah
> NYS Office for Technology
> shrihas.shah@oft.state.ny.us
> Phone (518) 408-2382
> Fax (518) 473-3389
> (US Postal Service Regular Mail Address)
> State Capitol ESP, PO Box 2062
> Albany, NY 12220-0062
> (Parcel Post/Overnight and Interagency Mail Address)
> Empire State Plaza
> Swan St., Core 4, 1st Floor
> Albany, NY 12223
> 
>  
> 
> 


-- 
Khalid K.

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org