Back to Top

Sunday 8 July 2012

J2EE: SERVLET: doGet() vs. doPost()

doGet():

  • 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.

Sunday 8 July 2012 by Anijit Sarkar · 14 Read more »

Popular Posts

All Rights Reserved JAVA INTERVIEW QUESTIONS | Privacy Policy | Anijit Sarkar