2011-07-11 105 views
0

沒有映射我得到這個誤差找到HTTP請求與URI

沒有映射在DispatcherServlet的發現HTTP請求與URI [/ VAL/valsys/AUTH /登錄]名爲 'VAL'

<?xml version="1.0" encoding="UTF-8"?> 
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> 
<display-name>val</display-name> 

<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> 


<context-param> 
    <param-name>contextConfigLocation</param-name> 
    <param-value> 
    /WEB-INF/spring-security.xml 
    /WEB-INF/applicationContext.xml 
    /WEB-INF/dwr-context.xml  
    </param-value> 
</context-param> 

<context-param> 
    <param-name>log4jConfigLocation</param-name> 
    <param-value>/WEB-INF/classes/log4j.properties</param-value> 
</context-param> 

<context-param> 
    <param-name>log4jRefreshInterval</param-name> 
    <param-value>1000</param-value> 
</context-param> 


<servlet> 
    <servlet-name>val</servlet-name> 
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> 
    <load-on-startup>1</load-on-startup> 
</servlet> 

<servlet-mapping> 
    <servlet-name>val</servlet-name> 
    <url-pattern>/*</url-pattern> 
</servlet-mapping> 

<servlet-mapping> 
    <servlet-name>val</servlet-name> 
    <url-pattern>/valsys/dwr/*</url-pattern> 
</servlet-mapping> 

<listener> 
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> 
</listener> 

<listener> 
<listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class> 
</listener> 

<welcome-file-list> 
    <welcome-file>index.jsp</welcome-file> 
    </welcome-file-list> 
</web-app> 

這是怎麼我的dispatcher.xml樣子..

<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://www.springframework.org/schema/beans" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:p="http://www.springframework.org/schema/p" 
xsi:schemaLocation="http://www.springframework.org/schema/beans 
     http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> 

<!-- Declare a view resolver --> 
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" 
     p:prefix="/WEB-INF/jsp/" p:suffix=".jsp" /> 

</beans> 

回答

1

你映射你的請求分發程序Servlet 但你沒有在您的調度員定義任何映射,所以我T不能處理它

看一看這個simple example

+0

感謝幫助 – bala

+0

我有一個@Controller在我的項目 @Controller @RequestMapping( 「/ AUTH」) 公共類LoginLogoutController {\t \t @資源(名稱= 「的SessionRegistry」) \t普里瓦e SessionRegistryImpl sessionRegistry; \t \t @RequestMapping(值= 「/登錄」,方法= RequestMethod.GET) \t公共字符串getLoginPage() \t \t { \t \t的System.out.println( 「在登錄頁面控制器」); \t \t return「login」; \t} 和 INFO efaultAnnotationHandlerMapping - 映射的URL路徑[/認證/註冊]到處理程序[[email protected]] 在我的控制檯....請回復 – bala

0

在 'WEB-INF/web.xml' 中,我們聲明的Spring DispatcherServlet和映射 '*。html的' 網址到它:

相關問題