-
May 14th, 2009, 01:06 PM
#1
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.
-
May 14th, 2009, 02:40 PM
#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>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules