Hi Scott
I had this working. I do not have my code readily available so if you need
more specific information after reading this, please let me know and I will
send on a precise code snippet. I defined a local action forward within
the configuration of what you are calling ActionA, the local action forward
would forward to the name under which ActionB was itself defined in the
configuration file.
e.g. if the struts configuration file looks like:
<action name="/myactionA" ...etc.../>
<action name="myactionB" ...etc.../>
then I defined a <forward name="toActionB" path="/myActionB"/> within the
definition of ActionA and in the perform() method of ActionA i wrote code
that does a mapping.findForward("toActionB"). I recall it all worked this
way.
Please excuse any syntax errors above, as said I don't hvae my code to hand.
Just let me know if you want the precise code I can send it on tomorrow
- Paul
----- Original Message -----
From: "Scott A. Roehrig" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, December 01, 2001 9:59 PM
Subject: ActionForward to anything other than a jsp
Hi:
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
work.
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.
Scott
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>