分享

Spring MVC 能够直接访问jsp页面

 鹰皇软件 2015-04-11
引用 3 楼 sma11cat 的回复:
缺少这个?
XML/HTML code?
1
2
3
4
5
6
7
8
9
10
<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>
不行  加进去报错 下面是我原来的web.xml配置
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www./2001/XMLSchema-instance"
xmlns="http://java./xml/ns/javaee"
xsi:schemaLocation="http://java./xml/ns/javaee http://java./xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Smart2</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:/spring/*.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Smart2</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<filter>
<filter-name>CharacterFilter</filter-name>
<filter-class>
org.springframework.web.filter.CharacterEncodingFilter
</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CharacterFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- <error-page>-->
<!-- <error-code>400</error-code>-->
<!-- <location>/jsp/error/checkdatabasepage.jsp</location>-->
<!-- </error-page>-->
<!-- <error-page>-->
<!-- <error-code>401</error-code>-->
<!-- <location>/jsp/error/errorpage.jsp</location>-->
<!-- </error-page>-->
<!-- <error-page>-->
<!-- <error-code>403</error-code>-->
<!-- <location>/jsp/error/errorpage.jsp</location>-->
<!-- </error-page>-->
<!-- <error-page>-->
<!-- <error-code>404</error-code>-->
<!-- <location>/jsp/error/errorpage.jsp</location>-->
<!-- </error-page>-->
<!-- <error-page>-->
<!-- <error-code>500</error-code>-->
<!-- <location>/jsp/error/errorpage.jsp</location>-->
<!-- </error-page>-->
</web-app>

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多