You should be able to redirect to an action that then forwards to the
tiles definition..

Something like

<action path="/foo" type="YourAction">
   <forward name="success" value="/bar.do" redirect="true" />
</action>

<action path="/bar" type="YourAction">
  <forward name="success" value="your.tile.def" />
</action>

Its not perfect, but then what is?

Mark

On 2/27/06, Bruce Link <[EMAIL PROTECTED]> wrote:
>
>
> I can do those things, but forwarding is not a problem. What I am trying to
> do is redirect. Even though I give 'redirect="true"' (as shown in original
> post) struts does a forward. I can tell by the URL shown in the browser, as
> well as reloading which posts to newUser.do whereas I want it to go to the
> confirmation page (what I want is the typical pattern to avoid reloading the
> page doing a duplicate post, in this case creating a new user twice)
>
>  Bruce
>  Laurie Harper <[EMAIL PROTECTED]>
>
>
>
>
>
>
>
> Laurie Harper <[EMAIL PROTECTED]>
>  Sent by: news <[EMAIL PROTECTED]>
>
> Feb 26, 2006 07:59 PM
> Please respond to
>  "Struts Users Mailing List" <user@struts.apache.org>
>
>
> To
>  user@struts.apache.org
>
>
> cc
>
>
>
> Subject
>  Re: Interaction between Struts and Tiles - redirect doesn't?
>
>
>  That seems kinda redundant to me ;-) Just use the ForwardAction that
>  comes with Struts:
>
>    <action path="..."
> type="org.apache.struts.actions.ForwardAction"
>            parameter="page.newUserForm"/>
>
>  I think you can also do something like this,
>
>    <action path="..." forward="page.newUserForm"/>
>
>  Not sure about that, though.
>
>  L.
>
>  Mark Lowe wrote:
>  > For some reason a simple forwarding action needs to go through an action
> class.
>  >
>  > Something like
>  >
>  > public class BlankAction extends Action {
>  > public ActionForward execute(..) throws Exception {
>  >     return mapping.findForward("success");
>  > }
>  > }
>  >
>  > <action path="/newUserForm" type="foo.struts.BlankAction">
>  >    <forward name="success" value="page.newUserForm" />
>  > </action>
>  >
>  >
>  > Should work just fine.
>  >
>  > Mark
>  >
>  >
>  > On 2/26/06, Bruce Link <[EMAIL PROTECTED]> wrote:
>  >>
>  >>
>  >>
>  >>
>  >> I am trying to put together an example j2ee web site using struts/tiles
> as
>  >> the front end, using struts 1.2.8.  I have been trying to guess and
>  >> experiment to find out how to merge the two, since most examples just
> use
>  >> jsp pages for the view layer, and I am trying to use tiles throughout.
>  >> What more or less works is to define each tiles page, and use them as
> the
>  >> target of forward actions.  Where the examples give a jsp input, I use a
>  >> forward action that goes to the tile.  However, I then wind up with a
>  >> forward to the confirmation page, where I would like a redirect (to
> avoid
>  >> reposting problems).  I tried to add redirect="true" as below, but it
> still
>  >> forwards (with the action defined below, the final confirmation page
>  >> displays /host/context/newUser.do in the browser window).  I attempted
>  >> changing path from page.newUserConfirmation to /newUserConfirmation and
>  >> defining an action with path /newUserConfirmation to forward to
>  >> page.newUserConfirmation, but I get the context root added to  the url.
>  >>
>  >> Any ideas on how to get redirected to the confirmation page?
>  >>
>  >>     <action
>  >>       attribute="newUserForm"
>  >>       input="/newUserForm.do"
>  >>       name="newUserForm"
>  >>       path="/newUser"
>  >>       scope="request"
>  >>       type="ca.bcit.infosys.web.action.NewUserAction">
>  >>       <forward name="showNewUserConfirmation" redirect="true" path=
>  >> "page.newUserConfirmation" />
>  >>     </action>
>  >>     <action path="/newUserForm"  scope="request" validate="false"
> forward=
>  >> "page.newUserForm" />
>
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>

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

Reply via email to