开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜