开发者

where are doGet() and doPost() methods in the servlets translated from jsps

开发者 https://www.devze.com 2023-02-14 07:48 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消