java 错误 400:请求 [/editRecordsAction] 不包含名为的处理程序参数
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3353329/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error 400: Request[/editRecordsAction] does not contain handler parameter named
提问by ptr
I'm creating a struts app and I am using an dispatch action. This was working a while ago and now has stopped and is holding me up. here is the the action mapping and the action request for one page. It give mes an error on all the pages that use the dispatch action. I get these errors.
我正在创建一个 struts 应用程序,并且正在使用调度操作。这是前一段时间工作的,现在已经停止并阻碍了我。这是一页的动作映射和动作请求。它在所有使用调度操作的页面上给我一个错误。我收到这些错误。
Error 400: Request[/editRecordsAction] does not contain handler parameter named
错误 400:请求 [/editRecordsAction] 不包含名为的处理程序参数
console error
控制台错误
[7/28/10 8:28:38:658 CDT] 0000001d DispatchActio E org.apache.struts.actions.DispatchAction unspecified Request[/editRecordsAction] does not contain handler parameter named
[7/28/10 8:28:38:658 CDT] 0000001d DispatchActio E org.apache.struts.actions.DispatchAction 未指定请求[/editRecordsAction] 不包含命名的处理程序参数
<action name="editRecords" path="/editRecordsAction" type="ccreports.actions.editRecordsAction"
parameter="parameter">
<forward name="editRepViewFwd" path="jsps/RepViewEdit.jsp"></forward>
<forward name="editSupViewFwd" path="jsps/SupViewEdit.jsp"></forward>
<forward name="noViewActionFwd" path="jsps/NoViewSelect.jsp"></forward>
<forward name="delRepFwd" path="jsps/RepViewEdit.jsp"></forward>
<forward name="delSupFwd" path="jsps/SupViewEdit.jsp"></forward>
<forward name="delNoFwd" path="jsps/NoViewSelect.jsp"></forward>
</action>
<html:form action="/editRecordsAction?parameter=editSupViewAction">
Thanks for the help.
谢谢您的帮助。
回答by Buhake Sindi
Your problem is found here"
您的问题在这里找到”
<html:form action="/editRecordsAction?parameter=editSupViewAction">
You forgot to add the .do(or whatever servlet mapping you have) to your action.
您忘记将.do(或您拥有的任何 servlet 映射)添加到您的操作中。
Here's the solution:
这是解决方案:
<html:form action="/editRecordsAction.do?parameter=editSupViewAction">
回答by DefyGravity
Error 400: Request[/editRecordsAction] does not contain handler parameter named
错误 400:请求 [/editRecordsAction] 不包含名为的处理程序参数
this error message lets me think the link should have looked like:
此错误消息让我认为链接应该如下所示:
/editRecordsAction.do?parameter=OneOfYourForwardNames
/editRecordsAction.do?parameter=OneOfYourForwardNames
dispatch actions require a httprequest parameter be passed in, and the name of the required parameter is the name you type in your struts mapping. in your case 'parameter'. the form's action is not giving editRecordsAction what it needs is my best guess...
dispatch 操作需要传入一个 httprequest 参数,所需参数的名称是您在 struts 映射中键入的名称。在你的情况下'参数'。表单的操作没有给 editRecordsAction 它需要的东西是我最好的猜测......
hope this helps,
希望这可以帮助,

