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
Post a Comment