我有一个Spring MVC Web应用程序,我想显示一个简单的欢迎页面(index.html)。在那个页面上,我只需要2个href链接:一个将我带入登录页面,然后使用Spring Security(2.5.6)和Hibernate 3实现,另一个用于新用户的注册页面。如何防止Spring Security 2.5重写加载欢迎页面(index.html)
但是,问题是Spring Security每次都会自动加载我的登录页面,并且不会加载index.html页面,我已经编写了2个链接来将我转发给登录或注册。我被带到登录页面,工作正常。但是,我永远不会显示我的Web应用程序的初始index.html页面。
任何人都可以阐明如何防止Spring Security通过登录页面覆盖“欢迎页面”。
非常感谢。
这是我的Spring Security在web.xml中设置:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
WEB-INF/spring-beans.xml
WEB-INF/spring-security.xml
</param-value>
</context-param>
<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>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
LIMC, 非常感谢你指出我的错误。为了可能遇到这个愚蠢的错误,使我今天花费了4个多小时的任何其他人的利益,我意外地在Spring Security部分的一个拦截URL中有index.htm *。 – checkers 2010-07-08 20:59:10