java - Spring 4 No mapping found for HTTP request -


i'm running spring 4 , trying build basic rest web service proof of concept. here web.xml:

<!doctype web-app public  "-//sun microsystems, inc.//dtd web application 2.3//en"  "http://java.sun.com/dtd/web-app_2_3.dtd" >  <web-app id="poc" version="2.4"     xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"     xsi:schemalocation="http://java.sun.com/xml/ns/j2ee                         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">      <display-name>archetype created web application</display-name>      <servlet>         <servlet-name>ws</servlet-name>         <servlet-class>             org.springframework.web.servlet.dispatcherservlet         </servlet-class>         <load-on-startup>1</load-on-startup>     </servlet>      <servlet-mapping>         <servlet-name>ws</servlet-name>         <url-pattern>/</url-pattern>     </servlet-mapping>      <context-param>         <param-name>contextconfiglocation</param-name>         <param-value>/web-inf/ws-servlet.xml</param-value>     </context-param>      <listener>         <listener-class>             org.springframework.web.context.contextloaderlistener         </listener-class>     </listener> </web-app> 

here's definition of servlet in application context:

http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">

<bean name="/remembername" class="com.corrisoft.air.ws.remembernamecontroller" init-method="init">     <property name="personservice" ref="personservice"/> </bean> 

here messages i'm getting spring:

info: mapped url path [/remembername] onto handler '/remembername' .... warning: no mapping found http request uri [/springpoc/ws/remembername] in dispatcherservlet name 'ws' 

where springpoc name of war file i'm deploying under tomcat. remembernamecontroller directly extends httpservlet.

can tell me i'm doing wrong mapping?

i think this:

<servlet-mapping>     <servlet-name>ws</servlet-name>     <url-pattern>/</url-pattern> </servlet-mapping> 

needs this:

<servlet-mapping>     <servlet-name>ws</servlet-name>     <url-pattern>/ws/*</url-pattern> </servlet-mapping> 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -