struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Jouravlev" <>
Subject Re: Forward to different Form/JSP from one action
Date Tue, 18 Jul 2006 20:14:39 GMT
On 7/18/06, billintx <> wrote:
> I'd like to do something like this:
> <action path="/edit" type=""
> input="/pages/selectTemplate.jsp">
>    <forward name="template1" path="/jsp/editTemplate1.jsp" />
>    <forward name="template2" path="/jsp/editTemplate2.jsp" />
>    <forward name="template3" path="/jsp/editTemplate3.jsp" />
> </action>
> Each template would require a different ActionForm?

Depends on your design. Generally, no.

> Should I create and put the ActionForm in the request manually?

As you like.

> Should I chain this with another action, so i'd have <forward name="template1"
> path="/" /> , where editTemplate1 action has the correct
> ActionForm?

Chaining like this is frowned upon and often can be avoided.

"Input" property does not define an input page, it defines an error
page. Struts architecture does not care where input is submitted from,
all it cares is what's in the request.

You should display /pages/selectTemplate.jsp with another action, so
selectTemplate.jsp would be output page for that action, and
editTemplateX.jsp would be output pages for EditAction. Again, there
are NO input pages in Struts.

See this for discussion:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message