sim085
Apr 25th, 2006, 07:18 PM
Hi,
I do not know how best to explain this, however I will give it a go. I am trying to build my first spring application. I am starting from the web layer and then I hope I do the bussiness and data access layers as well.
However I have a small problem. When I am running my application (on tomcat) I have a ClassNotFoundException that it could not find the org.springframework.web.servlet.DispatcherServlet. Now I am sure that all the spring libreries are in place.
What I have is the web.xml under the WEB-INF folder and also the app-servlet.xml. My web.xml file (where the problem seems to be) is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN'
'http://java.sun.com/dtd/web-app_2_3.dtd'>
<web-app>
<servlet>
<servlet-name>app</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-start-up>1</load-on-start-up>
</servlet>
<servlet-mapping>
<servlet-name>app</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
</web-app>
I have checked on the online Spring MVC Step by Step and also on a book I have and the Web.xml file is writen in that way as well.
Also something else is that when I press the refresh button the exception goes away, and instead the web page says Servlet app is not available, The requested resource (Servlet appis not available) is not available.
Please ask me for any further information required, and thanks for any support!
regards,
sim085
I do not know how best to explain this, however I will give it a go. I am trying to build my first spring application. I am starting from the web layer and then I hope I do the bussiness and data access layers as well.
However I have a small problem. When I am running my application (on tomcat) I have a ClassNotFoundException that it could not find the org.springframework.web.servlet.DispatcherServlet. Now I am sure that all the spring libreries are in place.
What I have is the web.xml under the WEB-INF folder and also the app-servlet.xml. My web.xml file (where the problem seems to be) is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN'
'http://java.sun.com/dtd/web-app_2_3.dtd'>
<web-app>
<servlet>
<servlet-name>app</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-start-up>1</load-on-start-up>
</servlet>
<servlet-mapping>
<servlet-name>app</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
</web-app>
I have checked on the online Spring MVC Step by Step and also on a book I have and the Web.xml file is writen in that way as well.
Also something else is that when I press the refresh button the exception goes away, and instead the web page says Servlet app is not available, The requested resource (Servlet appis not available) is not available.
Please ask me for any further information required, and thanks for any support!
regards,
sim085