今天想在项目中用urlrewrite进行地址伪静态,我用的是ssh,我都照以前配置好了,可是我怎么访问都是404,可是我要是把跳转的action改成jsp页面就好了。。。。。郁闷!
<!-- urlrewrite -->
<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter
</filter-class>
谷歌地图和苹果 iPhone 分手吗 <init-param>
<param-name>logLevel</param-name>
<param-value>WARN</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
后来找了好多资料。。。
最后找到原因:
原来用org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter Struts2过滤器需要加点东西
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/struts/*</url-pattern>
<dispatcher>REQUEST </dispatcher>
<dispatcher>FORWARD </dispatcher>
<dispatcher>INCLUDE </dispatcher>
</filter-mapping>
posted on 2011-06-24 11:24
墙头草 阅读(2427)
评论(3) 编辑 收藏