Pierre M�tras wrote:
> 
> 
> Second (well, times later) run
> ====================
> - java.lang.NullPointerException
> at
> org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.ja
> va:1375)
> at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1241)
> at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:417)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> etc...
> 
> I used to write:
>             return new ActionForward(mapping.getInput());
> in "Action.process" when I wanted my action to return to the calling form
> (partial validation, error...).
> Now, the getInput call returns null, instead of the original path, so the
> RequestDispatcher in ActionServlet fails to forward the request, and thus
> the NullPointerException.
> I didn't investigate enough to find if this is now a "normal" feature of
> version 1.0. There was a similar bug discussed in the mailing list the 15th
> Aug 2000, but it was diagnosed to an action.xml error. I doubled check my
> struts-config.xml and it seems correct.
> 

mapping.getInput() works OK if you have the "input" attribute set in
the corresponding action tag in struts-config.xml

Luke.



> Change it to:
>             return mapping.findForward("forwardName")
> But don't forget to add the new "forwardName" in struts-config.xml
> 


-- 
 Luke Taylor.
 PGP Key ID: 0x57E9523C

Reply via email to