Struts1.x NoSuchMethodException的一种可能
来源:互联网 发布:ios 沙盒存储数组 编辑:程序博客网 时间:2024/06/01 11:14
DispatchAction发生错误
环境:
strut-config.xml文件
jsp页面
Action
错误信息:
NoSuchMethodException
javax.servlet.ServletException: Action[/MOD101Action] does not contain specified method (check logs)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
java.lang.NoSuchMethodException: Action[/MOD101Action] does not contain specified method (check logs)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:261)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:170)
org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
发生原因
将protected改为public
环境:
strut-config.xml文件
jsp页面
Action
错误信息:
NoSuchMethodException
javax.servlet.ServletException: Action[/MOD101Action] does not contain specified method (check logs)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
java.lang.NoSuchMethodException: Action[/MOD101Action] does not contain specified method (check logs)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:261)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:170)
org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
发生原因
在使用dispatchaction的时候,分发的方法为protected私有,无法进行分发。(是程序拷贝带来的问题)。
将protected改为public
重新启动服务器,运行正常。
- Struts1.x NoSuchMethodException的一种可能
- struts1.x的formbean
- struts1.x的国际化
- STRUTS1.X的国际化
- struts1.x的国际化
- Struts1.x的使用
- Struts1.X与Spring集成——第一种方案
- Struts1.X 的 jar 包
- struts1.x的简单流程
- Struts1.x的验证框架
- Struts1.x的文件上传
- struts1.X的国际化问题
- struts1.x的工作流程
- Struts1.X 的 jar 包
- struts1.x的tiles理解
- Struts1.X的工作流程
- struts1.x的初步认识
- 再谈Struts1.x的运行机制
- ubuntu12.10中关闭触摸面板的软件
- 让你的应用快速适配iphone5
- json应用,responseText,responseXml,XMLhttpRequest和ajax开发框架
- QApplication
- js实现user增删改查
- Struts1.x NoSuchMethodException的一种可能
- 深入理解计算机系统第五章--编写高效程序
- UVA 11374 Airport Express
- jQuery介绍入门和对象转换,选择器
- scons实践笔记(2)--带选项的编译
- JDBC连接数据库大全
- COM笔记-接口
- jQuery的Dom操作
- Spring的配置文件