In the Servlets that are translated from jsps , I notice that there is _jspservice()
method but no d开发者_开发问答oGet()
and doPost()
methods ? how does the servlet differentiate the GET
and the POST
methods ?
There is no real difference in handling of GET
and POST
requests in JSP. If you are interested in what method was used, you can call getMethod()
to find out.
The way JSPs work is the same as if you overrode service(ServletRequest, ServletResponse)
in a Servlet instead of doGet
/ doPost
.
精彩评论