spring mvc框架中,web.xml的url-pattern采用/app/*形式拦截请求,页面应该如何导入css、js?
2个回答
展开全部
<filter>
<filter-name>SecurityFilter</filter-name>
<filter-class>com.analytics.common.filter.SecurityFilter</filter-class>
<init-param>
<param-name>checkSessionKey</param-name>
<param-value>user</param-value>
</init-param>
<init-param>
<param-name>redirectURL</param-name>
<param-value>/login</param-value>
</init-param>
<init-param>
<description>/img/*,/resource/* 不需要过滤的目录,目前只支持一级目录.uri可以写多个;号隔开</description>
<param-name>notCheckURLList</param-name>
<param-value>/img/*;/resource/*;/login</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>SecurityFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SecurityFilter</filter-name>
<url-pattern>*</url-pattern>
</filter-mapping>
filter加一个
<param-name>notCheckURLList</param-name>
就可以了,具体目录是下边这样的
<param-value>/img/*;/resource/*;/login</param-value>
<filter-name>SecurityFilter</filter-name>
<filter-class>com.analytics.common.filter.SecurityFilter</filter-class>
<init-param>
<param-name>checkSessionKey</param-name>
<param-value>user</param-value>
</init-param>
<init-param>
<param-name>redirectURL</param-name>
<param-value>/login</param-value>
</init-param>
<init-param>
<description>/img/*,/resource/* 不需要过滤的目录,目前只支持一级目录.uri可以写多个;号隔开</description>
<param-name>notCheckURLList</param-name>
<param-value>/img/*;/resource/*;/login</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>SecurityFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SecurityFilter</filter-name>
<url-pattern>*</url-pattern>
</filter-mapping>
filter加一个
<param-name>notCheckURLList</param-name>
就可以了,具体目录是下边这样的
<param-value>/img/*;/resource/*;/login</param-value>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2014-02-18
展开全部
以前怎么导入就怎么导入
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询