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

  • DispatcherServlet noHandlerFound No mapping found for HTTP request

    Hi,

    I am new to Spring framework and trying to run a small web application but getting below error.

    org.springframework.web.servlet.DispatcherServlet noHandlerFound No mapping found for HTTP request with URI [/TestApp/view/jsps/login.jsp] in DispatcherServlet with name 'TestApp'

    I checked few posts about the same problem but still not able to resolve this. Not sure whats the problem.

    Below is my web.xml file

    <servlet>
    <servlet-name>TestApp</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
    <servlet-name>TestApp</servlet-name>
    <url-pattern>*.jsp</url-pattern>
    </servlet-mapping>


    config file -

    <bean class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    <property name="mappings">
    <props>
    <prop key="*.jsp">loginController</prop>
    </props>
    </property>
    </bean>


    <bean id="loginController" class="com.test.LoginController">
    <property name="commandName"><value>Login</value></property>
    <property name="commandClass"><value>com.test.commands.Login </value></property>
    <property name="validator"><ref bean="loginValidator"/></property>
    <property name="formView"><value>/login.jsp</value></property>
    <property name="successView"><value>/home.jsp</value></property>
    </bean>

    Thanks for your help.

  • #2
    check..

    try this in your servlet or your config file


    <bean id="viewResolver" class="org.springframework.web.servlet.view.Intern alResourceViewResolver">
    <property name="viewClass"><value>org.springframework.web.se rvlet.view.JstlView</value></property>
    <property name="prefix"><value>/WEB-INF/jsp/</value></property>
    <property name="suffix"><value>.jsp</value></property>
    </bean>

    Comment

    Working...
    X