Announcement Announcement Module
No announcement yet.
Annotations + SimpleURLHandlerMapping in same application Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Annotations + SimpleURLHandlerMapping in same application

    My application has been running using SimpleURLHandlerMapping since months and now I am trying to convert it to annotation based controller one by one. I am triying to run the application with both of them running together till i convert all into annotations.

    Following is my servlet.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="" xmlns:xsi=""
    xmlns="" xmlns:context=""

    <context:component-scan base-package="com.he.sbo.controller"/>

    <bean id="urlMapping"
    class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    <property name="mappings">
    <entry key="/*/">
    <ref bean="loginController" />
    <bean class="org.springframework.web.servlet.mvc.annotat ion.DefaultAnnotationHandlerMapping">

    After adding the bean for Annotation handler I am not able to use my simple formHandler and receiving the following error
    javax.servlet.ServletException: No adapter for handler [[email protected]]: Does your handler implement a supported interface like Controller?
    org.springframework.web.servlet.DispatcherServlet. getHandlerAdapter(
    org.springframework.web.servlet.DispatcherServlet. doDispatch(
    org.springframework.web.servlet.DispatcherServlet. doService(
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(
    org.springframework.web.servlet.FrameworkServlet.d oPost(
    javax.servlet.http.HttpServlet.service(HttpServlet .java:637)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:717)

    Please help me out