struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <brenmcgu...@tariffenet.it>
Subject Re: Forward to the same page
Date Fri, 25 Aug 2006 08:09:05 GMT
Thomas Hamacher ha scritto:
> How do I forward to the same page I was coming from? The typical example for 
> this is the "change-language-problem". Someone is on one page and simply 
> wants to change the language and expects to see the same page in a different 
> language.
>   

Just an idea, <html:form> tag has the "action" attribute that is no more 
required. If it is not specified the last servlet path (i.e. "post 
back") will be taken.
http://struts.apache.org/1.x/struts-taglib/tlddoc/html/form.html
You could grab the code that controls the value of the "action" 
attribute to determine the path you're coming from. Then you "change the 
language" and then redirect (I think it's better than forwarding) to the 
previous servlet path.

HTH
Antonio


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


Mime
View raw message