File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes ActionMapping - findForward() problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ActionMapping - findForward() problem" Watch "ActionMapping - findForward() problem" New topic

ActionMapping - findForward() problem

Lukas Alamar
Ranch Hand

Joined: Mar 17, 2004
Posts: 68
hi all,

i want to forward to a jsp page from my Action class , so i mapped a logical name, say "failure" to a path /jsp/failure.jsp, but when it comes to finding the mapping mapping.findForward("failure") returns null...

here's my action mapping definition:

<forward name="success" path="/jsp/poResult.jsp" />
<forward name="failure" path="/jsp/poNotFound.jsp" />

everything's fine for me but maybe some of you can spot a mistake in the code above or has faced the same problem before..

[ June 13, 2005: Message edited by: Lukas Alamar ]

SCJP 1.4
Jack Wiesenthaler
Ranch Hand

Joined: Jul 26, 2001
Posts: 75
The config looks fine, perhaps your action class was not found and the action mapping was not processed? Did you get any initialization errors on the console when struts-config was processed?
Karl Beowulph
Ranch Hand

Joined: May 31, 2004
Posts: 130
Can you post your action class?

Does the "success" forward work?
I agree. Here's the link:
subject: ActionMapping - findForward() problem
jQuery in Action, 3rd edition