I am struggling to implement a link on the toolbar of my web application to switch the user's locale using Struts.
It is NOT that I'm struggling with laying out the links and implement the Action to switch the locale, it is, that I WANT TO RETURN TO THE PAGE WHERE THE REQUEST CAME FROM afterwards.
How do I do (configure) this, since I cannot configure this in the action mapping of struts-config.xml, because simply the request can be sent from ANY of my jsp's.
Returning a 'new ActionForward(mapping.getInput())' from the Action also does not help here, because for the same reason I cannot configure an 'input' in struts-config.xml.
Thanks in advance
/wolfgang
Discussions
Web tier: servlets, JSP, Web frameworks: Struts Action to switch locale and REFRESH current jsp
-
Struts Action to switch locale and REFRESH current jsp (3 messages)
- Posted by: Wolfgang Nolze
- Posted on: September 24 2004 04:02 EDT
Threaded Messages (3)
- Re:Struts Action to switch locale and REFRESH current jsp by Ash H on September 25 2004 19:47 EDT
- I need this too! by Bryce Crossman on August 24 2005 10:42 EDT
- use LocaleAction with page attribute set to the current page by Aravind Reddy on July 19 2006 22:44 EDT
-
Re:Struts Action to switch locale and REFRESH current jsp[ Go to top ]
- Posted by: Ash H
- Posted on: September 25 2004 19:47 EDT
- in response to Wolfgang Nolze
May be You should check this locale change feature in a class that should extend RequestProcessor and forward it to the current page with the link on.Use preprocessProcess or processLocale method of this class.
Cuae every request is intercepted by this in Struts framework.
Ash -
I need this too![ Go to top ]
- Posted by: Bryce Crossman
- Posted on: August 24 2005 10:42 EDT
- in response to Wolfgang Nolze
Have you found any more information on how do implement this? I have the exact same problem and I having a lot of trouble finding an answer. Any help would be greatly appreciated. -
use LocaleAction with page attribute set to the current page[ Go to top ]
- Posted by: Aravind Reddy
- Posted on: July 19 2006 22:44 EDT
- in response to Wolfgang Nolze
create a actionmapping of type LocaleAction with the page attribute set to the current page