DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=30292>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30292 Replacement of LookupDispatchAction ------- Additional Comments From [EMAIL PROTECTED] 2004-07-23 15:34 ------- Jean-Baptiste Thanks for taking the trouble to contribute code to struts. I have the following comments on your enhacement: Firstly, getParameterMap() was introduced in the Servlet 2.3 specification and Struts is currently maintaining compatibility to Servlet 2.2. Secondly, the DisptachAction's execute method that you overrode also handled "cancelled" behaviour and had a check to prevent re-cursive calls to execute/perform. if you overrode the getMethodName() rather than the execute() method 1) it makes the code simpler and 2) retains these features. Something like... protected String getMethodName(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, String parameter) throws Exception { StringTokenizer tokenizer = new StringTokenizer(parameter, " ,;\t\r\n", false); while (tokenizer.hasMoreTokens()) { String theMethodName = tokenizer.nextToken(); if (request.getParameter(theMethodName) != null) { return theMethodName; } } return null; } Lastly, I'm not sure whether this provides significant additional behaviour from the three DispatchAction flavours already provided to warrant inclusion in struts. What does anyone else think? Maybe you should post a message on the user list to canvas support - ask people to vote for this bug (theres a vote link at the top) if they think it should be included in struts. If other users were keen to use it then that would add more weight IMO. Niall --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
