This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have one html page which calling a servlet. In this servlet service method is overridden. In form tag of html page method is either GET or POST. So after I click submit button in html page it calls servlet and servlet executes. So how this happens?
The defualt implementation of service method checks for the HTML form's method and it forward to GET and POst depending on method's type.But since your are overriding the service method, The new code will be executed insted of checking for method's type. No errors, just works fine.
Here is the actual code of HttpServlet's service() method default implementation. request.getMethod() method is used to determine the type of method used by client browser while it invoked the service:
SCWCD 1.4<br />---------------------<br />Ability is what you're capable of. <br />Motivation determines what you do. <br />Attitude determines how well you do it.<br />---------------------