Hi,
I'm having some trouble when using @Controller. I'm gettingapplicationContext.xml:WARN [org.springframework.web.servlet.PageNotFound] - <No mapping for [/call.omri] in DispatcherServlet with name 'springMVC'>
My controller is:Code:<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> <!-- Auto detect controllers with @Controller --> <context:component-scan base-package="com.web.controller"/>
Code:@Controller public class ClassificationsController { public ClassificationsController() {} private ClassificationsManager cacheReference; @RequestMapping("/call.omri") public ModelAndView handleRequest(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception { Some code... return null; } }
I've tried using
in web-context.xml (dispatcher servlet context) but still same thing.Code:<bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping"/> <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/> <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>
I also tried using @RequestMapping on the controller itself (and not on a specific method) but still nothing.
Any help would be appreciated.
Thanks.


Reply With Quote