You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by li...@bt.com on 2002/03/13 18:37:17 UTC

Defining a forward path- not to a JSP, but to another Action

Hi

In the examples I've seen - any forwards that are defined (whether
global-forwards or action-specific) seem to point to JSP pages, i.e.

<global-forwards>
      <forward name="login" path="/login.jsp"/>
      <forward name="success" path="/home.jsp"/>
</global-forwards>

However I'd like for my user to login (handled by LoginAction) and then not
just be sent straight to home.jsp.  Instead, I'd like to forward to
HomeAction which will prepare the necessary beans for use by home.jsp.

How do I go about defining this in structs-config.xml?  I'm a bit lost
because I keep seeing elements called "path" but some look like "/login.jsp"
and some look like "/login".  Why is this?  Can you put "/home.do" as a
forward path and it will forward to HomeAction?  Or is this done simply by
putting "/home" as the forward path.

I'm sure this is very simple, but I really need to figure it out before my
boss realises how little progress I've made this week!  =o(

Thanks.

Lindsay

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>