最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

struts2找不到对应action错误的解决

旗下网站admin25浏览0评论

struts2找不到对应action错误的解决

struts2找不到对应action错误的解决

错误如下:

There is no Action mapped for namespace [/users] and action name [User_login] associated with context path [/Struts2AndHibernate].


对应解决方法:

1、struts2版本问题

一开始使用的是2.5版本,所以web.xml 配置如下:

 <filter>  
        <filter-name>struts2</filter-name>  
        <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>  
    </filter>



后来改成2.3.4,问题辫解决了,同时web.xml需修改成如下:

<filter>  
        <filter-name>struts2</filter-name>  
        <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>  
    </filter>  

发布评论

评论列表(0)

  1. 暂无评论