struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Lin" <linto...@gmail.com>
Subject some question about adding parameter when redirecting in struts.
Date Tue, 01 Jan 2008 09:51:17 GMT
hi all,
    Happy new year!
    I have got a question about how to set parameter to the url when using
redirect in struts.
    For example, i am going to update a persion's profile. And I am using
PersonUpdateAction to do this. When I finish doing the update operation I
would redirect to the page which show the profile, the view mode not edit
mode. Here is the sequence.

view  profile  --->  personview.do?name=tony  ----(go to edit mode)---->
> personedit.do?name=tony  ---(update the profile and return to view
> mode)--->  personview.do?name=tony
>

   Now the problem comes up. In PersonUpdateAction I finish the update
operation, and go to redirect to personview.do. But the URL in the Browser
is personedit.do, not personview.do?name=tony. I want to and the parameter
like "?name=tony" to the url.

<action path="/personupdate" type="PersonUpdateAction"
>     scope="request">
>     <forward name="info" redirect="false"
>         path="/personview.do" />
> </action>
>


   Do you know what I am talking about?

 regards tony lin

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message