Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4761
  • Last Modified:

javax.servlet.ServletException: No adapter for handler [com.springmvc.action.springservlet@8d3d62]: Does your handler implement a supported interface like Controller?

Hi i am having problem with spring
spring-servlet.xml
 
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd" >
 
<beans>
<bean name="/submitResult.htm" class="com.springmvc.action.springservlet">
</bean>
 
<bean id="viewResolver" class= "org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
</beans>
 
app-db.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd" >
<beans>
<bean id="cpmsDS" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName"><value>com.mysql.jdbc.Driver</value></property>
        <property name="url"><value>jdbc:mysql://sachinaserver:3306/hr?useUnicode=true</value>
		</property>
        <property name="username"><value>root</value></property>
        <property name="password"><value></value></property>
    </bean>
 
    <bean id="pool" class="org.apache.commons.pool.impl.GenericObjectPool">
        <property name="minEvictableIdleTimeMillis"><value>300000</value></property>
        <property name="timeBetweenEvictionRunsMillis"><value>60000</value></property>
    </bean>
 
    <bean id="dsConnectionFactory" class="org.apache.commons.dbcp.DataSourceConnectionFactory">
        <constructor-arg><ref bean="cpmsDS"/></constructor-arg>
    </bean>
 
    <bean id="poolableConnectionFactory" class="org.apache.commons.dbcp.PoolableConnectionFactory">
        <constructor-arg index="0"><ref bean="dsConnectionFactory"/></constructor-arg>
        <constructor-arg index="1"><ref bean="pool"/></constructor-arg>
        <constructor-arg index="2"><null/></constructor-arg>
        <constructor-arg index="3"><null/></constructor-arg>
        <constructor-arg index="4"><value>false</value></constructor-arg>
        <constructor-arg index="5"><value>true</value></constructor-arg>
    </bean>
 
    <bean id="pooledDS" class="org.apache.commons.dbcp.PoolingDataSource" depends-on="poolableConnectionFactory">
        <constructor-arg><ref bean="pool"/></constructor-arg>
    </bean>
	</beans>
 
 
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
 <servlet>
<servlet-name>hello</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>hello</servlet-name>
<url-pattern>/submitAction.htm</url-pattern>
</servlet-mapping> 
<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>/submitResult.htm</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>context</servlet-name>
<servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
<load-on-startup>3</load-on-startup>
</servlet>
<listener>
   <listener-class>
    org.springframework.web.context.ContextLoaderListener
   </listener-class>
  </listener>
  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    /WEB-INF/applicationContext.xml 
       /WEB-INF/app-db.xml
    </param-value>
  </context-param>
</web-app>

Open in new window

0
czutshi
Asked:
czutshi
1 Solution
 
objectsCommented:
> com.springmvc.action.springservlet

that class needs to be a Spring controller

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now