- doGet()
- doPost()
- doHead()
- doPut()
- doDelete()
- doOptions()
- doTrace()
- The GET method sends the encoded user information appended to the page request in the URL.
- The page and the encoded information are separated by the ? character as follows:
- The GET method has size limtation: only 1024 characters can be in a request string.
public void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
// Servlet code
}
Post Method:
- More reliable method of passing information is the POST method.
- Post method also packages the information exactly the same way as GET methods, but instead of sending it in the URL, it sends it as a separate message.
- There is no limitation for the Post method.
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// Servlet code
}
No comments:
Post a Comment