struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dichotomy <dichot...@greenmail.ch>
Subject Re: mapping.findForward( mapping.getInput() ) ?
Date Tue, 15 Jul 2003 22:17:08 GMT
On Tue, 15 Jul 2003 12:34:07 -0600
Michael Muller <mmuller@theworld.com> wrote:
> > 1) You can use mapping.getInputForward() - more straightforward.
> 
> so would you say cavaness's example broken?  is there any way to 
> configure struts such that it would work?

I'm not saying anything about Cavaness' book. I haven't read it so I cannot comment :-) I'm
just saying you can get the Input forward easily this way.

> > 2) Yes, the forward can point to any resource, from a tiles definition to a jsp
or an action url (I'm talking about the value you put in the <forward name="myforward"
path="?"/> bit).
> 
> but you can't stick in a forward, correct?  this is very confusing, that 
> you say forward= and then you can give it almost anything EXCEPT a 
> forward.  :(

Well the thing is that tag is *defining* a forward, so if you're trying to put another forward
in the path= property then you're doing something wrong, cause if that other forward is accessible
from this action, then you don't need to define it again!!

To clarify, in mapping.findForward() you can put the name of a forward that you defined in
a <forward> tag. The string that you pass to findForward() is the name property of the
<forward> tag.

In the <forward> tag's path property, you can put:
- the path to a jsp page (eg "/pages/mypage.jsp")
- the action path to an action (eg "/do/myAction" or "/myAction.do")
- a tile definition if you defined them globally (eg "tiledef.admin.login" or "mytiledef")
- see the Tiles doc for how to do that.

-- 
If education is too expensive, try ignorance.

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


Mime
View raw message