I have tried to configure my flex and spring mvc based on the documentation here http://static.springsource.org/sprin...and-spring-mvc
I am keeping things consolidated under single Dispatcher Servlet hence using
Code:<servlet> <servlet-name>spring-mvc</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>spring-mvc</servlet-name> <url-pattern>/spring/*</url-pattern> </servlet-mapping>For my mvc controllers I am using the annotated configuration with context component scanCode:<flex:message-broker> <flex:mapping pattern="/messagebroker/*" /> </flex:message-broker>
and my controllerCode:<beans> <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/> <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/> <context:component-scan base-package="com.mypackage"/> </beans>
The code works fine but I do get one problem when I configure it in the above fashion.Code:@Controller public class ConfirmController { @RequestMapping("/confirm.htm") public void confirm(){ System.out.println("hello"); } }
When I hit the link http://localhost/spring/confirm.htm
This is what I get on console
Due to keeping things under one dispatcher servlet I have to use servlet-mapping of /spring/*. The first line is the expected output. What should I do about the warning?Code:hello 01 Sep 2010 13:44:53 WARN [http-80-2]: org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/spring/confirm] in DispatcherServlet with name 'spring'


Reply With Quote