hey all.
Thing is that i made my sample project (
java web project) and added Spring capabilities and hibernate capabilities. In my web.xml i defined ContextLoaderListener and gave ContextConfigLocation
************************************************** *********
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListe ner
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext.xml
/WEB-INF/applicationContext-hibernate.xml
</param-value>
</context-param>
************************************************** *******
applicationContext.xml is containing beans (conrollers, managers and DAO declarations)
applicationContext-hibernate.xml is containing dataSource, sessionFactory and transactionManager information.
after that i decided to add MVC module of spring and add following into web.xml
************************************************** **
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
************************************************** *****
I have added action-servlet.xml in WEB-INF folder. and provided "viewResolver" and "urlMapping". BUt when i try to run the project following error occur
**************************************************
javax.servlet.ServletException: No adapter for handler [controller.CityController@17ebdf8]: Does your handler implement a supported interface like Controller?
************************************************** *
Although I have provided CityController in action-servlet.xml
************************************************** *
This is being a headache for me since one day. Is this not the way to use Spring + Spring MVC + Hibernate
**********************************
I m using forums for the very first time. Sorry if i forget any discipline.