最近在使用struts2的时候出现了一个莫名其妙的问题。
我的struts.xml配置的好好的,如下
<action name="register" class="com.lifewool.action.RegisterAction">
<result name="success">success.jsp</result>
<result name="input">index.jsp</result>
</action>
结果访问他的时候缺莫名其妙的报出
No result defined for action com.lifewool.action.RegisterAction and result success
真是百思不得其解。
最后通过多方查证是Struts2-Convention-Plugin.jar这个包引起的。
这个包是实现Struts零配置功能的。他会扫描你的所有action、actions、struts 、struts包下含有execute方法的类。并根据其类名建立xxx.action映射。这时候当你访问XXX.action时系统会首先调用零配置方法配置的action,而这时候你又没有使用注解配置其result。当然就报找不到no result啦。
结论就是如果你既用了XML配置和零配置。零配置的各种信息会覆盖XML的。
解决办法。1、如果你的action类名是XXXAction 请不要在XML配置中设置其action name属性为XXX
2、使用零配置
3、去掉Struts2-Convention-Pluginx.xx.jar这个包
分享到:
相关推荐
jsp\No result defined for action and result input.doc
No result defined for action.doc
RF and Digital Signal Processing for Software-Defined Radio: A Multi-Standard Multi-Mode Approach by Tony J. Rouphael RF and Digital Signal Processing for Software-Defined Radio: A Multi-...
to present signal processing principles used in the software defined radio, ranging from analog ,digital modulation to RF, DSP and data conversion.
最近在使用python过重遇到这个问题,NameError: name 'xxx' is not defined,在学习python或者在使用python的过程中这个问题大家肯定都遇到过,在这里我就这个问题总结以下几种情况: 错误NameError: name ‘xxx’ ...
linux ls find 时大于2G文件时出现Value too large for defined data type 系统本身支持大于2G文件但查询有问题的解决办法
Software-defined radios (SDRs) have been around for more than a decade. The first complete Global Positioning System (GPS) implementation was described by Dennis Akos in 1997. Since then several ...
Software Defined Radio Architectures, Systems and Functions
3G软件无线电software defined radio for 3G,很不错,可惜是英文的,
中文译名《软件无线电中的射频与数字信号处理》,不可多得的一部实用的软件无线电著作,可以当作手册,供工程人员参考借鉴。
django执行命令 python manage.py startapp xxx报错os not defined问题
Learn to:Control storage costs,Eliminate storage bottlenecks,Use IBM GPFS to solve storage management challenges
今天小编就为大家分享一篇解决Pycharm下面出现No R interpreter defined的问题,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
Software_Defined_Radio_using_MATLAB_Simulink_and_the_RTL-SDR第三章中文翻译版
Virtualized Software-Defined Networks and Services 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,...
软件无线电,Simulink 文档类型:电子书 页数:674 2015年新书
Further areas of exploration include: distributions defined in terms of the multivariate normal, chi-square, t, and F (central and non-central); the one- and two-sample Wilcoxon test, together with ...
Data clustering is a common technique for statistical data analysis, which is used in many fields, including machine learning, data mining, pattern recognition, image analysis and bioinformatics. ...
UDF官方教程5.User Defined Scalars and Memory.pdf