File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ActionMapping - findForward() problem" Watch "ActionMapping - findForward() problem" New topic
Author

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:

<action-mappings>
<action
path="/selectPo"
type="gest.web.PoSelectAction"
name="poSelectForm"
scope="request"
validate="true"
input="/jsp/poForm.jsp">
<forward name="success" path="/jsp/poResult.jsp" />
<forward name="failure" path="/jsp/poNotFound.jsp" />
</action>
</action-mappings>


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..

thanx
[ 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?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: ActionMapping - findForward() problem
 
Similar Threads
Another "Validator Plugin" Problem
Struts validation problem..
Actionforward Problem
action mapping for pre-login
Action Form Problem