又遇No result defined for action org.action.AddAction and result success
2016-04-09 15:52
357 查看
No result defined for action org.action.AddAction and result success
又遇到这个错误了
4000
[/code]
更改为
报错:No result defined for action org.action.AddAction and result add
最后的解决方案让我哭笑不得,我把add换成test,可以了
input.jsp
struts.xml
我想可能是有些单词被用做其他的地方,导致解析时出了错
又遇到这个错误了
public String add() { this.m_dResult=this.getA()+this.getB(); System.out.print(this.getA()+" "+this.getB()+" "+this.getResult()); return "add"; }
<struts> <package name="default" extends="struts-default"> <action name="add" class="org.action.AddAction" method="add"> <result name="add">/output.jsp</result> </action> </package> </struts>
4000
[/code]
更改为
public String add() { this.m_dResult=this.getA()+this.getB(); System.out.print(this.getA()+" "+this.getB()+" "+this.getResult()); return "add"; }
public String execute() {
return add();
}
报错:No result defined for action org.action.AddAction and result add
最后的解决方案让我哭笑不得,我把add换成test,可以了
input.jsp
<form action="add.action" method="post"> <tr> <td><input type="text" name="a"> </td> <td>+</td> <td><input type="text" name="b"></td> <td><input type="submit" value="="> </tr> </form>
struts.xml
<action name="add" class="org.action.AddAction" method="execute"> <result name="success">/output.jsp</result> </action>
我想可能是有些单词被用做其他的地方,导致解析时出了错
相关文章推荐
- 二分匹配题集
- JAVA round 和 floor的区别
- c#设计模式-单例模式
- Cortex-M3工作模式与异常
- Python 练习实例8
- 用angularjs做全选和反选遇到的问题
- static变量与static函数
- Android-->原生保存Bitmap(图片),压缩图片,创建图片缩略图和视频缩略图(任意大小)
- freemarker之生成静态页面
- 数据结构-栈的顺序结构两种方式
- Linux内核分析——进程描述与创建
- JspSmartUpload中文乱码问题解决
- Linux学习笔记11
- RN(react native)入坑指南-01,Hello RN,Windows下的环境搭建
- 第四章:Shiro的身份认证(Authentication)
- 浅谈a++ 与a--
- c++ java相互调用
- 拓扑排序题集
- Sublime3 Terminal UBuntu install
- Android使用编译后的第三方库(集成环境下)