-
Jan 5th, 2013, 05:08 AM
#1
No adapter for handler [ControllerPack.ContactController@588a588a]
I have used both <mvc:annotation-driven /> and SimpleControllerHandlerAdapter but still facing the issue.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-3.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schem...ng-mvc-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan
base-package="ControllerPack" />
<mvc:annotation-driven />
<bean class="org.springframework.web.servlet.mvc.SimpleC ontrollerHandlerAdapter"/>
<!-- <bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBas edViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlVi ew" />
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
-->
<bean id="ContactController" autowire="byName"
class="ControllerPack.ContactController">
</bean>
<bean id="urlMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
<property name="mappings">
<map>
<entry key="/contacts.html"><ref bean="ContactController"/></entry>
<entry key="/addContact.html"><ref bean="ContactController"/></entry>
</map>
</property></bean>
</beans>
Last edited by faraz; Jan 5th, 2013 at 05:39 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules