Having issue with mapping in spring dispatcher servlet -


i have jsp page contains form , on submitting form need call get method. current mapping, when try load jsp page instead of loading jsp page calls get method.

following mappings made.

web.xml:

<servlet>         <servlet-name>dispatcher</servlet-name>         <servlet-class>org.springframework.web.servlet.dispatcherservlet</servlet-class> </servlet>     <servlet-mapping>     <servlet-name>dispatcher</servlet-name>     <url-pattern>/test/*</url-pattern>   </servlet-mapping> 

testharnesscontroller :

@controller @requestmapping("/testharness") public class testharnesscontroller {      @requestmapping(method = requestmethod.get)     public string handlegetrequest(httpservletrequest request, httpservletresponse response) {         return null;      }      @requestmapping(method = requestmethod.post)     public string handlepostrequest(httpservletrequest request, httpservletresponse response) {         return null;      }    } 

and jsp page url is: http://localhost.ms.com:8080/databox/test/testharness.jsp

please give me suggestions struggling since 2 -3 days.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -