我在web.xml中配置了以下过滤器
<filter>
<filter-name>accessFilter</filter-name>
<filter-class>com.org.security.AccessFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>accessFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>org.sitemesh.config.ConfigurableSiteMeshFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
这是我的自定义过滤器,我在其上检查所请求的授权页面:
<filter>
<filter-name>accessFilter</filter-name>
<filter-class>com.zk.dcs.webapp.security.AccessFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>accessFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
一切正常,但无法正确呈现UI。
寻求支持,这里有什么问题?
答案 0 :(得分:0)
谢谢, 我发现了这个问题,我的资源正在被传递,如&#34; .css.html&#34;格式,我有* .html过滤器 我用一些支票修好了
if( (url.contains(".css")) || (url.contains(".js")) || (url.contains("img")) ||(url.contains("image"))){
chain.doFilter(request, response);
}