struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Struts Newsgroup (@Basebeans.com) <str...@basebeans.com>
Subject Re: Re: Forwarding to action
Date Sun, 23 Jun 2002 15:10:02 GMT
Subject: Re: Re: Forwarding to action
From: "Davor Cengija" <dcengija_remove_@inet.hr>
 ===

"Tero P Paananen" <tpp@viant.com> wrote in message
news:mailman.1024843980.475.struts@basebeans.com...
> > > > Is it possible to return a forward to another action
> > (e.g. to chain
> > > > actions)?
> > >
> > > Yes.
> >
> > Excellent!
> >
> > However, I'm not able to find that class/method. Hint?
>
> ActionForward forward = mapping.findForward( "your_forward_name" );
> return forward;
>
> Define the forward in your struts-config.xml just as you would
> for a JSP page. The use it exactly the same for any resource,
> whether JSP, HTML, PDF, another action, etc. etc.

Thanks for your effort, but somehow it seems I haven't explained my problem
exactly.

I do know that I can forward to another action/jsp/pdf by calling its PATH
(to say it that way), but that path must be already resolved: I can forward
to /myApp/something/list.do or /myApp/do/something/list but that way I'm
tied to /do/* or *.do mapping, and to myApp application name. I'd like to
forward to action as Struts sees it, not as servlet container/browser does.

So,
<action path="/something/list" type=",....">
  <forward name="list" path="/WEB-INF/jsp/something/listDetails.jsp"/>
</action>

Now I'd like to forward my current action to "/something/list" and stop
worrying about what will happen next. If I change "list" jsp in action
"/something/list" i don't have to change it on some other place.

I hope I'm a little bit clearer now.

Thanks



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message