The HTTP Servlet class expands the GenericServlet Class and appliance the Serializable Interface. Also It provides http specified ways for example doGet, doPost, doHead, dotrace etc.
Ways of Httpservlet Class
Different methods of HTTPServlet class is given below:
- public void service(ServletRequest req,ServletResponse res) sends off the request to the secured service ways by changing the request and response object into http variety.
- protected void service(HttpServletRequest req, HttpServletResponse res) Acquire the request from the service technique, and sends off the request to the doXXX() method by turning on the incoming http request type.
- protected void doGet(HttpServletRequest req, HttpServletResponse res) holds the GET request. It is supplicate by the web container.
- protected void doPost(HttpServletRequest req, HttpServletResponse res) hold the POST request. It is supplicate by the web container.
- protected void doHead(HttpServletRequest req, HttpServletResponse res) holds the HEAD appeal. It is supplicate by the web container.
- protected void doOptions(HttpServletRequest req, HttpServletResponse res) holds the OPTIONS appeal. It is supplicate by the web container.
- protected void doPut(HttpServletRequest req, HttpServletResponse res) holds the PUT appeal. It is supplicate by the web container.
- protected void doTrace(HttpServletRequest req, HttpServletResponse res) holds the TRACE appeal. It is supplicate by the web container.
- protected void doDelete(HttpServletRequest req, HttpServletResponse res) holds the DELETE appeal. It is supplicate by the web container.
- protected long getLastModified(HttpServletRequest req) gives back the time when HttpServletRequest was finally modified as long as midnight January 1, 1970 GMT.