You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/07/01 16:11:24 UTC
DO NOT REPLY [Bug 21226] New: -
misleading error message in LookupDispatchAction
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21226>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21226
misleading error message in LookupDispatchAction
Summary: misleading error message in LookupDispatchAction
Product: Struts
Version: Nightly Build
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Standard Actions
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: skubibugs@skubi.eu.org
This bug is in Struts 1.1 release.
DispatchAction and LookupDispatchAction
emit the error message dispatch.parameter form bundle
org.apache.struts.actions.LocalStrings
The message says:
Request[{0}] does not contain handler parameter named {1}
The problem: the message will sometimes appear even though the
handler parameter is present (it happens when the value of the parameter
cannot be mapped onto a method name).
Example:
With the following declaration
<action path="/updateArticle" type="sudety.UpdateArticleAction"
parameter="actionKind"
name="sudetyArt"
scope="request">
(UpdateArticleAction extends LookupDispatchAction)
I perform an HTTP GET on the following URI (relative to the context):
/updateArticle.do?actionKind=foo
and Tomcat says:
The request sent by the client was syntactically incorrect
(Request[/updateArticle] does not contain handler parameter named actionKind).
This is wrong, because the request does contain parameter actionKind;
the problem is with the value 'foo' of the parameter, which does not
correspond with any method.
Suggestion:
In the case of LookupDispatchAction, I suggest that three different
error messages be reported, depending on the situation:
1. The current message dispatch.parameter is OK when the parameter is absent
2. When the value of the parameter cannot be mapped onto a massage name
in a bundle, we could use a message like this:
dispatch.reversemap=In request[{0}], handler parameter named '{1}' has
value '{2}', that cannot be mapped onto a message name in resource bundle {3}
3. When the name of the message cannot be mapped onto a method name, we could
use a message like this (unless you can find something simpler):
dispatch.finalmap=In request[{0}], handler parameter named '{1}' has
value '{2}', that maps onto message name '{3}', and the latter cannot be
mapped onto a method name.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org