java - ServletRequest (how to get RequestMethod)? -
i have servletrequest, client machine sent. how know 1 is: get
post
update
or delete
?
if using spring mvc , comunication protocol http, don't need use servletrequest, can use directly httpservletrequest in method this:
public modelandview index(httpservletresponse response, httpservletrequest request)
but if need use servletrequest , sure comunication protocol http can cast servletrequest httlservletrequest , use getmethod() shriram said.
Comments
Post a Comment