You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2006/11/29 14:41:57 UTC

[jira] Resolved: (STR-2903) MappingDispatchAction throws an error when mapping.getParameter returns null

     [ http://issues.apache.org/struts/browse/STR-2903?page=all ]

Niall Pemberton resolved STR-2903.
----------------------------------

    Resolution: Fixed
      Assignee: Niall Pemberton

Fix thanks!

http://svn.apache.org/viewvc?view=rev&revision=480570

> MappingDispatchAction throws an error when mapping.getParameter returns null
> ----------------------------------------------------------------------------
>
>                 Key: STR-2903
>                 URL: http://issues.apache.org/struts/browse/STR-2903
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Extras
>    Affects Versions: 1.2.9
>         Environment: Windows/Tomcat
>            Reporter: George Jempty
>         Assigned To: Niall Pemberton
>             Fix For: 1.3.6
>
>         Attachments: MappingDispatchAction.patch.txt
>
>
> The JavaDoc for MappingDispatchAction states that unspecified() is the "method which is dispatched to when there is no value for the parameter in the ActionMapping."  When I don't specify "parameter" in the ActionMapping however, I get the following stack trace:
> ERROR [http-8080-Processor24] (BaseCCAction.java:66) - DispatchMapping[/msalogin] does not define a handler property
> javax.servlet.ServletException: DispatchMapping[/msalogin] does not define a handler property
> 	at org.apache.struts.actions.DispatchAction.getParameter(DispatchAction.java:325)
> 	at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:170)
> 	at org.apache.struts.actions.MappingDispatchAction.execute(MappingDispatchAction.java:169)
> 	at com.cypresscare.web.common.actions.BaseCCAction.execute(BaseCCAction.java:60)
> 	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
> My investigation shows that this is due to MappingDispatchAction's execute() method doing nothing except delegating to DispatchAction's execute() method:
> 	public ActionForward execute(
> 		ActionMapping mapping,
> 		ActionForm form,
> 		HttpServletRequest request,
> 		HttpServletResponse response)
> 		throws Exception {
>         
>         // Use the overridden getMethodName. 
>         return super.execute(mapping, form, request, response);
> 	}
> Furthermore, as evident from my attached stack trace, it is the overridden getParameter() that actually needs to be used
> HTH
> George Jempty (ps my manager is Chuck Cavaness!!)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira