struts2.3.16 convention 零配置 bug
来源:互联网 发布:2017手机电视直播软件 编辑:程序博客网 时间:2024/06/04 17:55
【前言】
之前搞struts2的零配置都很简单的搞定,今天搞了一天,
把一些收获写到这里,
希望可以帮助到遇到同样问题的人。
【jar包】
新建了一个项目之后使用的struts2.3.16,应该算是最新的了,
然后在包com.uikoo9.action新建一个类TestAction,
其中有一个info方法,
访问test!info.action的时候一直报找不到的错误,
后来将所有的jar包替换为2.3.1的包就没问题了。
【解决】
1.action需要继承ActionSupport
2.struts.xml文件中需要加这一句话:
< constant name= "struts.enable.DynamicMethodInvocation" value = "true" />
【原因】
一直在用struts,也习惯于使用类似这种方法action!method.action,但是现在才发现,
原来并不推荐这么访问,
上面的参数就是说能不能直接访问方法,如果是true则可以访问,否则则不行。
【demo】
http://pan.baidu.com/s/1hqih27q
0 0
- struts2.3.16 convention 零配置 bug
- STRUTS2 Convention零配置
- 简述STRUTS2 Convention零配置
- 简述Struts2 Convention零配置
- 简述Struts2 Convention零配置
- 简述Struts2 Convention零配置
- 简述STRUTS2 Convention零配置
- 简述STRUTS2 Convention零配置
- (转)Struts2 Convention零配置
- 简述Struts2 Convention零配置
- 简述STRUTS2 Convention零配置
- 简述Struts2 Convention零配置
- Struts2 struts2-convention-plugin(零配置)基础
- Struts2 struts2-convention-plugin(零配置)基础
- Struts2 Convention Plugin ( struts2 零配置 )
- Struts2 Convention Plugin ( struts2 零配置 )
- Struts2 Convention Plugin ( struts2 零配置 )
- Struts2 之convention-plugin实现零配置
- Linux下cfsetospeed和cfsetispeed函数
- 浅谈大数据和高并发的解决办法
- System.exit(0)和System.exit(1)区别
- google Gson
- 从Trie树(字典树)谈到后缀树(10.28修订)
- struts2.3.16 convention 零配置 bug
- Android优秀开源项目
- 使用js解决跨域访问的问题
- 配置hibernate环境
- DOS中端口的连接状态
- asp.net 写日志记录
- 深入 Java 调试体系,第 2 部分: JVMTI 和 Agent 实现
- NodeJs抓取新闻正文和正文中的图片
- C/C++入门到高手PDF收藏