码迷,mamicode.com
首页 > 其他好文 > 详细

struts2学习笔记——常见报错及解决方法汇总(持续更新)

时间:2017-05-16 23:06:39      阅读:319      评论:0      收藏:0      [点我收藏+]

标签:context   ase   names   release   for   通配符   标签   status   解决方法   

操作环境:(1)Tomcat 7.0.72.0

     (2)OS Name: Windows 7

      (3)JVM Version:  1.8.0_25-b18

      (4)eclipse Version: Kepler Service Release 2

     (5)struts2 version:struts2-core-2.5.10.1

 

1.通配符访问方法,报错404错误找不到页面

  (1)错误原因:struts.xml中缺少<global-allowed-methods>regex:.*</global-allowed-methods>,根据字面理解就是允许以*通配符的方式访问方法

  (2)详细错误:HTTP Status 404 - There is no Action mapped for namespace [/] and action name [] associated with context path [/struts2002].

  (3)报错截图:

技术分享

      (4)解决方案:在package标签之间添加<global-allowed-methods>regex:.*</global-allowed-methods>即可

 

struts2学习笔记——常见报错及解决方法汇总(持续更新)

标签:context   ase   names   release   for   通配符   标签   status   解决方法   

原文地址:http://www.cnblogs.com/caoleiCoding/p/6863937.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!