Hi!
here is my web.xml :
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd ">
<servlet>
<servlet-name>spring-dispatcher</servlet-name>
<servlet-class>>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>spring-dispatcher</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
</web-app>
and here is my spring-dispatcher-servlet:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd ">
<bean name="/hello-world.html" class="com.wiley.jfib.ch06.helloworld.service.HelloWorldService" />
</beans>
Now my problem is that when I build my project (with Ant), it works well, but when I deploy it, I gets the error:
java.lang.ClassNotFoundException: >org.springframework.web.servlet.DispatcherServlet at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)....
I use spring-framework-2.5.5.
And my sproject structer show like this:
- bin
- com.wiley.jfib.ch06.helloworld.service
- src
- com.wiley.jfib.ch06.helloworld.service
- web
- WEB-INF
- jsp
- hello-world.jsp
- lib
- jstl.jar, spring-webmvc.jar, spring.jar, standard.jar
- web.xml, spring-dispatcher-servlet.xml
- jsp
- WEB-INF
- build.xml
Why that?