struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Husted <hus...@apache.org>
Subject Re: [PATCH] LookupDispatchAction
Date Sun, 19 Jan 2003 20:46:51 GMT
Contrary to the general advice on the Bugzilla page, we actually like 
these attached to the corresponding ticket =:0)

-Ted.

A Stephen wrote:
> [PATCH]
> Index: LocalStrings.properties
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-struts/src/share/org/apache/struts/actions/LocalStri
> ngs.properties,v
> retrieving revision 1.5
> diff -r1.5 LocalStrings.properties
> 5a6
> 
>>dispatch.parameter.error=Request[{0}] does not contain method mapping  for
> 
> {1}
> 
> Index: LookupDispatchAction.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-struts/src/share/org/apache/struts/actions/LookupDis
> patchAction.java,v
> retrieving revision 1.10
> diff -r1.10 LookupDispatchAction.java
> 231d230
> <
> 233c232,235
> <
> ---
> 
>>        if (methodName==null){
>>            String message =
> 
> messages.getMessage("dispatch.parameter.error", mapping.getPath(), name);
> 
>>            throw new ServletException(message);
>>        }
> 
> 
> <comment>
> Please don't get me wrong I'm a big fan/advocate of struts and wasn't trying
> to say it was Strut's fault.
> I was merely trying to submit a patch; and avoid hours of frustration for
> the people that use resin/ struts
> 
> If it works on platform and not the other , we all might as well be
> developing Microsoft applications.
> </comment>
> 
> ----- Original Message -----
> From: "Wendy Smoak" <Wendy.Smoak@asu.edu>
> To: "'Struts Developers List'" <struts-dev@jakarta.apache.org>
> Sent: Friday, January 17, 2003 6:56 AM
> Subject: RE: [PATCH] Re: Nasty Error when use LookupDispatchAction
> 
> 
> 
>>>Everything works beautifully until you try and mess the query string
>>>for e.g  /edit.do?submit=initchanged&key=10
>>>there is no mapping for initx, hence there is no method name and null is
>>>passed into the
>>>return dispatchMethod(mapping, form, request, response, methodName)
>>>which finally calls getMethod(String name, Class[] parameterTypes)
>>>The end result is that application shuts down with VM error
>>
>>This has been discussed before and I believe the general consensus is that
>>there's a bug in Resin.  If you try the same thing in Tomcat, you will
> 
> only
> 
>>get an exception.
>>
>>Still, I don't like the behavior of LookupDispatchAction so I override the
>>execute() method in which I examine the request parameters.  If the
> 
> "action"
> 
>>is present, I just call super.execute().  Otherwise I try to figure out
> 
> what
> 
>>would be appropriate (add?  edit?) before giving up and throwing an
>>exception.
>>
>>I would like to add a "default" attribue to the tag in struts-config so
> 
> you
> 
>>can specify which method to call if the parameter isn't present in the
>>request.
>>
>>In short, I don't think that VM Error is the fault of Struts.
>>
>>--
>>Wendy Smoak
>>Applications Systems Analyst, Sr.
>>Arizona State University PA Information Resources Management
>>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-dev-help@jakarta.apache.org>
> 
> 


-- 
Ted Husted,
Struts in Action <http://husted.com/struts/book.html>


--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@jakarta.apache.org>


Mime
View raw message