Saturday, 7 July 2012
J2EE: SERVLET: doGet() vs. doPost()
Do you like this Article?
doGet():
doPost():
- protected void doGet(HttpServletRequest req, HttpServletResponse resp)throws ServletException, java.io.IOException – is a method of Class HttpServlet. It is called by the server (via the service method) to allow a servlet to handle a client's GET request.
- In doGet(), the client’s request parameters are appended to the URL and sent along with header information.
- doGet() is not a secured process because the request parameters are clearly visible in the URL.
- Since request parameters are sent along with header information, so only a limited amount of data should be sent.
doPost():
- Protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException – is a method of Class HttpServlet. It is called by the server (via the service method) to allow a servlet to handle a POST request.
- In doPost(), the client’s request parameters are submitted via form.
- As in doPost(), client’s request parameters are sent via form body, the parameters’ values are not visible in any where, so its safe and secure.
- This method allows the client to send data of unlimited length to the Web server a single.
Subscribe to:
Post Comments (Atom)









3 Responses to “J2EE: SERVLET: doGet() vs. doPost()”
7 September 2012 09:02
hello ! have u any interest in data structure ???
7 September 2012 09:04
hello ! have u any interest in data structure ???
29 April 2013 02:49
thanks
Post a Comment