Here is a quick and dirty solution :
In your JSP you can add a form with an "origine" hidden field :

<form action="/changeLocale.do" method="post">
  <input type="hidden" name="origine" value="<%=  request.getRequestURL()
%>" >
  Language : <select>...</select>
  <input type="submit" value="translate">
</form>

This way, LocaleAction can do :
return new ActionForward(form.getOrigine());


Be careful that your JSP has to be able to reload without any parameter (if
beeing result of a "post" request).



I don't think this is a good solution.

I think it would be beter that your application knows it's current state and
is able to redisplay "current" page, using a "ReDisplayAction" that can
forward to the current JSP of your application.

Nico.

> Hi,
>
> Is there a way to set the "forward" page to be the same page that
originated
> the request?
>
> I want to enable users to change locale with a button. But I don't
> want them to go anywhere else after submitting their form.
>
> Here is an example to illustrate what I want to do (obviously, I know
> "path=thesamepage" won't work :-)).
>
>    <action   path="/changeLocale"
>               type="dk.au.registration.oekonomi.student.LocaleAction"
>               name="localeform"
>               scope="request"
>       validate="false"
> <forward name="success" path=thesamepage>
>     </action>
>
>
> Thanks,
>
> Heather Buch
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to