Dear friends, i ve question regarding service()and doget/dopost.. the container calls service() where it does the service for the request so then wat is the role of doget/dopost plz give me presice answer..
Methods Of servlet:
service() method: Once the servlet starts getting the requests, the service() method is called by the servlet container to respond. The servlet services the client's request with the help of two objects. These two objects javax.servlet.ServletRequest and javax.servlet.ServletResponse are passed by the servlet container.
doGet() method is the default HTTPServletRequest method. In this user entered data is appended to the URL as query String. It can send only limited amount of data.
In doPost() method the user entered information as data and not appended to the URL.It can send any amount of data. It is secure.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.