struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Owen" <>
Subject Re: ActionForward to anything other than a jsp
Date Sun, 02 Dec 2001 10:56:46 GMT
You can definitely forward to other Actions directly. Typically you map your
Struts ActionServlet to "*.do" in web.xml. If you've done that, then the
forward below won't work unless it ends in ".do"; the URLs of Actions
typically end in this.

Just an aside... there is no problem with instantiating and returning a new
ActionForward object in your Action class, though usually you return an
ActionForward that is looked up from struts-config.xml, like "return


----- Original Message -----
From: "Scott A. Roehrig" <>
To: <>
Sent: Sunday, December 02, 2001 3:59 AM
Subject: ActionForward to anything other than a jsp


I have read the archives and have seen some posts and responses to this
question, but was hoping something more definitive might be posted.

Within an ActionA, I would like to forward to another ActionB to continue
processing. Sounds reasonable. So, I look up the javadoc and see the section
about ActionForward and think okay I would simply do the following in the
first action

ActionForward forward = new ActionForward("/ActionServlet/ActionB");

return forward;

Well, so far no luck to say the least. I seem to always get 404 errors that
the page can't be found. I have seen a post about bypassing the
ActionForward and using the request.getRequestDispatcher and have not tried
that yet since it seemed so logical that the ActionForward method should

No go, the only workaround I found was to have the forward to a .jsp page
that did a <jsp:forward> to the actual action.

Can someone please let me know. Can an Action forward to another Action
instead of a JSP page and if so why does the above method not work?

Thanks for any guidance.


Do You Yahoo!?
Get your free address at

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

View raw message