HTTP Status 404 - type Status report message description The requested resource () is not available.
我的应用程序使用spring security和tiles。我的security-config有以下
<form-login login-page="/onlinebasket/login.html"
login-processing-url="/onlinebasket/loginProcess"
default-target-url="/onlinebasket/index.html"
always-use-default-target="true"
authentication-failure-url="/onlinebasket/login.html?login_error=1" />
<logout logout-url="/onlinebasket/logout" logout-success-url="/onlinebasket/login.html" />
以下是我的servlet-config
<mvc:annotation-driven />
<!-- Simple redirects to internal resources; URL path substring becomes view name (e.g. '/login.htm' -> 'login') -->
<bean name="/login.htm" class="org.springframework.web.servlet.mvc.UrlFilenameViewController"/>
<bean name="/denied.htm" class="org.springframework.web.servlet.mvc.UrlFilenameViewController"/>
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames" value="/WEB-INF/messages/message,/WEB-INF/messages/validation" />
</bean>
<bean id="tilesViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView" />
<property name="prefix" value="/WEB-INF/views/"/>
<property name="suffix" value=".jsp"/>
</bean>
<bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"
p:definitions="/WEB-INF/defs/tiles.xml" />
<mvc:interceptors>
<!-- Extends session for lazy loading on user requests -->
<bean class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<!-- Changes the locale when a 'locale' request parameter is sent; e.g. /?locale=de -->
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" />
</mvc:interceptors>
最后,我的web.xml有以下servlet
<servlet-mapping>
<servlet-name>onlinebasket</servlet-name>
<url-pattern>/onlinebasket/*</url-pattern>
</servlet-mapping>
答案 0 :(得分:0)
一个可能的问题可能是.html
中的security-config
和.htm
中的servlet-config
。