Results 1 to 2 of 2
  1. #1
    Pandu is offline Member
    Join Date
    Feb 2015
    Posts
    1
    Rep Power
    0

    Default What is the difference between Http Servlet Rquest and Servlet Request?

    I am working on a project which is based on java framework. This is very old project and that is why I do not know the logic behind the code. Could u please explain me the difference and in which circumstances I have to use Http Servlet Rquest and Servlet Request? Thank you.

  2. #2
    allen is offline Member
    Join Date
    Jan 2016
    Posts
    4
    Rep Power
    0

    Default Re: What is the difference between Http Servlet Rquest and Servlet Request?

    Hey,
    Servlet Request
    -Belongs to javax.servlet package.
    -It comes with many methods like getParameter() and many more.
    -Used in combination with GenericServlet.
    -It is Protocol independent
    -When HTTP was not used and when a request came from client, Web container used to create an object of ServletRequest and passed to service() method.

    Http Servelet Request- Sub interface of ServletRequest
    -Belongs to javax.servlet.http package
    -It inherits all the methods of ServletRequest and apart adds its own like getQueryString() etc.
    -Used in combination with HttpServlet.
    -Protocol dependent and specific for HTTP protocol.
    -When a request comes from client using HTTP protocol, Web container creates an object of HttpServletRequest and passes to service() method.

Similar Threads

  1. Segregation of POST and GET request in Servlet
    By duracell1234 in forum Java Servlet
    Replies: 9
    Last Post: 04-08-2014, 04:49 PM
  2. Difference between Servlet & Socket
    By pravingate07 in forum Java Servlet
    Replies: 0
    Last Post: 08-12-2011, 05:42 PM
  3. Unzipping a request in a servlet
    By abhiram88 in forum Java Servlet
    Replies: 1
    Last Post: 07-06-2011, 10:45 PM
  4. Dispatching request to another Servlet
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-27-2008, 08:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •