Announcement Announcement Module
Collapse
No announcement yet.
No mapping found for HTTP request Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • No mapping found for HTTP request

    Hello,

    i get the following error, executing a spring 3.2 web application:

    Code:
    INFO:   23:29:17,000 DEBUG DispatcherServlet:823 - DispatcherServlet with name 'dispatcher' processing GET request for [/login]
    INFO:   23:29:17,026 DEBUG DefaultAnnotationHandlerMapping:124 - Mapping [/login] to HandlerExecutionChain with handler [controller.LoginController@128bcc3] and 1 interceptor
    INFO:   23:29:17,067 DEBUG DispatcherServlet:912 - Last-Modified value for [/login] is: -1
    INFO:   23:29:17,197 DEBUG HandlerMethodInvoker:173 - Invoking request handler method: public java.lang.String controller.LoginController.login(org.springframework.ui.ModelMap)
    INFO:   23:29:17,224 DEBUG DefaultListableBeanFactory:1531 - Invoking afterPropertiesSet() on bean with name 'login'
    INFO:   23:29:17,224 DEBUG DispatcherServlet:1206 - Rendering view [org.springframework.web.servlet.view.JstlView: name 'login'; URL [/WEB-INF/jsp/login.jsp]] in DispatcherServlet with name 'dispatcher'
    INFO:   23:29:17,415 DEBUG JstlView:236 - Forwarding to resource [/WEB-INF/jsp/login.jsp] in InternalResourceView 'login'
    INFO:   23:29:17,415 DEBUG DispatcherServlet:823 - DispatcherServlet with name 'dispatcher' processing GET request for [/WEB-INF/jsp/login.jsp]
    INFO:   23:29:17,444  WARN PageNotFound:1108 - No mapping found for HTTP request with URI [/WEB-INF/jsp/login.jsp] in DispatcherServlet with name 'dispatcher'
    My dispatcher-servlet.xml contains the following (reduced to the main facts):
    Code:
        <context:component-scan base-package="root.package.path" />
        <context:annotation-config/>      
    <!--   <mvc:annotation-driven />  -->
        
        <bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
            <property name="viewClass"  value="org.springframework.web.servlet.view.JstlView"/>
            <property name="prefix"     value="/WEB-INF/jsp/"/>
            <property name="suffix"     value=".jsp" />
        </bean>
    And the LoginController is defined as:
    Code:
    @Controller
    public class LoginController {
    
        @RequestMapping(value = "/login", method = RequestMethod.GET)
        public String login(ModelMap model) {
            return "login";
        }
    ....
    }
    The spring section in my web.xml contains:
    Code:
        <!-- spring configuration -->    
        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>
        <servlet>
            <servlet-name>dispatcher</servlet-name>
            <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
            <load-on-startup>2</load-on-startup>
        </servlet>
    
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/dispatcher-servlet.xml</param-value>
        </context-param>
    
        <servlet-mapping>
            <servlet-name>dispatcher</servlet-name>
            <url-pattern>/*</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>login</welcome-file>
        </welcome-file-list>
    Maybe, the ContextLoaderListener and the contextConfigLocation is duplicated. I'm not sure. However, if I request localhost:8080/login, I receive the error stated above. Can anyone show me my error?? Thanks in advance!

    best
    uwe
Working...
X