/admin/list.do?method
On 25 Mar 2004, at 14:02, Brian Sayatovic/AMIG wrote:
Well, I tried overriding unspecified and I still get the following (mind
you that I didn't change the parameter name yet) when I hit
/admin/list.do:
Error 500: Request[/admin/list] does not contain handler parameter
named submit
My unspecified method I simply overrode from DispatchAction to call my normal refresh list method:
protected ActionForward unspecified(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response
) {
return this.refreshList(mapping, form, request, response);
}
While the JavaDocs do imply this should work, when I looked in the Struts
1.1 source, the execute method of LookupDispatchAction generates the erorr
message I see as soon as request.getParameter(parameterName) returns null.
In fact, I can find no reference to 'unspecified' anywhere in
LookupDispatchAction.
So I think there is a disconnect. Maybe LookupDispatchAction is broken and should be fixed to also use 'unspecified', or maybe its JavaDocs should explicitly state that it does not utilize the 'unspecified' behavior of its parent class. Or, maybe I missed something and didn't implement correctly?
Regards, Brian.
Mark Lowe <[EMAIL PROTECTED]> 03/24/2004 09:21 AM Please respond to "Struts Users Mailing List"
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
cc:
Subject: Re: LookupDispatchAction default
unspecified() is the method you want look at the javadoc.
you do need the method name though
/admin/list.do?method
I saw that using "submit" as the parameter name causes problems so i wouldn't use that.
On 24 Mar 2004, at 15:16, Brian Sayatovic/AMIG wrote:
I'd like to be able to have someone hit my action, /admin/list.do, without having to specify a submit paramater. However, the action is a subclass of LookupDispatchAction whci requires that the request parameter be supplied. Looking in the struts source code, it would be nice if the LookupDispatchAction could fall back to a default or not consider 'null' to be a bad value and just use 'null' as a key to the lookup Map. For now, any link or redirect to the page must specify what I consider to be the default action -- refresh -- on the URL: /admin/list/do?submit=Refresh.
Is there another way to do this? Is it worth suggesting that LookupDispatchAction support a default or null mapping?
Regards, Brian.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]