当前位置: 代码迷 >> Java Web开发 >> org.apache.struts.actions.dispatchAction的错误?
  详细解决方案

org.apache.struts.actions.dispatchAction的错误?

热度:8500   发布时间:2013-02-25 21:20:33.0
org.apache.struts.actions.dispatchAction的异常???
2009-12-8 12:43:06 org.apache.struts.util.PropertyMessageResources loadLocale
警告: Resource org/apache/struts/actions/LocalStrings_zh_CN.properties Not Found.
2009-12-8 12:43:06 org.apache.struts.util.PropertyMessageResources loadLocale
警告: Resource org/apache/struts/actions/LocalStrings_zh.properties Not Found.
2009-12-8 12:43:06 org.apache.struts.actions.DispatchAction unspecified
严重: Request[/login] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text.
2009-12-8 12:43:06 org.apache.struts.chain.commands.AbstractExceptionHandler execute
警告: Unhandled exception
javax.servlet.ServletException: Request[/login] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text.
at org.apache.struts.actions.DispatchAction.unspecified(DispatchAction.java:197)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:245)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:170)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Unknown Source)



  请各位高手能够指点下org.apache.struts.actions.dispatchAction的用法,或者哪里有org.apache.struts.actions.dispatchAction的相关质料,谢谢!!!

------解决方案--------------------------------------------------------
在struts-config中,配置parameter参数
比如
XML code
<action path="/xxx"        name="myForm"        type="xxx.XxxAction"        ...        parameter="flag">
------解决方案--------------------------------------------------------
请求的路径上缺少参数:method=方法,
------解决方案--------------------------------------------------------
<form action="loginAction.do?method=login" method="post">
UserName:<input type="text" name="username"/><br>
Password:<input type="password" name="password"/><br>
  相关解决方案