I just switched from Striped to Spring but i'm having issues with my very first project, Basically i get the 404 from the server. Strange enough, i have followed one by one all the steps in my book. I use Eclipse, Tomcat 6 and Spring 2.5 The structure of my project is like so: src> controllers(package)>SpringTestController(implements controller).....then ......web content>jsp(folder)>hello.jsp.....then....web-content>web-inf>SpringTest-servlet.xml and web.xml inside lib i have the 9 necessary jars.
my controller:
public class SpringTestController implements Controller{
public ModelAndView handleRequest(HttpServletRequest arg0, HttpServletResponse arg1) throws Exception {
return new ModelAndView("jsp/hello.jsp");
}
}
my SpringTest-servet.xml
<?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.htm" class="controllers.SpringTestController"/>
</beans>
my web.xml(without header to save space)
<servlet>
<servlet-name>SpringTest</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>SpringTest</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
Where do you think the problem could be? I have been trying to look around the files but beside web.xml "where i dont see any abnormality" i'm very new to this flow structure so i really cannot get where the problem is.
Thx for your time