On 7/21/05, Daniel Łaś <[EMAIL PROTECTED]> wrote:
> Hi
> 
> How can I forward to current page in Action ? I created locale change
> action and want to execute it form every page of site and always get
> back to the curent page.

Generally, action does not know about "current" page, because Action
is stateless. If you forwarded to a JSP page from action, I do not
know about ways to get the JSP page address. Browser would know only
action address.

You can try to return this from execute() method:
  return new ActionForward(request.getServletPath());

But only your own code can guarantee that your action displays the
same page as before.

Michael.

<plug mode>
Struts Dialogs are stateful, thus if you reload the same action, you
get the same page ;-)
</plug mode>

--
Struts Dialogs,
http://struts.sourceforge.net/strutsdialogs

Reply via email to