java struts2+urlrewrite 配置404错误

urlrewrite 安装配置参考: http://www.tuckey.org/urlrewrite/manual/2.6/#filterparams

 

出现404检查以下

web.xml 配置顺序

 

配置web.xml的时候,rewrite一定要在strtus2的上面 

 

ru:

< filter >
         < filter-name >UrlRewriteFilter </ filter-name >
         < filter-class >org.tuckey.web.filters.urlrewrite.UrlRewriteFilter </ filter-class >
         < init-param >
             < param-name >logLevel </ param-name >
             < param-value >error </ param-value >
         </ init-param >
     </ filter >
     < filter-mapping >
         < filter-name >UrlRewriteFilter </ filter-name >
         < url-pattern >*.html </ url-pattern >
     </ filter-mapping >
     < filter-mapping >
         < filter-name >UrlRewriteFilter </ filter-name >
         < url-pattern >*.action </ url-pattern >
     </ filter-mapping >
    
     < filter >
         < filter-name >struts2 </ filter-name >
         < filter-class >org.apache.struts2.dispatcher.FilterDispatcher </ filter-class >
     </ filter >
     < filter-mapping >
        < filter-name >struts2 </ filter-name >
        < url-pattern >/* </ url-pattern >
        < dispatcher >FORWARD </ dispatcher >  
     </ filter-mapping >

 

\\发各牢骚, 博客园编辑器实在是太卡了,特别是打字时候,删除文章修改整个浏览器卡住,CPU直升

 发片博客不容易,这现象有半个月了,所以不爱在博客园发文章了·

 

你可能感兴趣的:(urlrewrite)