HttpServlet class

HttpServlet is an abstract class present in javax.servlet.http package. This class is a subclass of GenericServlet class and used widely to create a servlet. Although HttpServlet extends GenericServlet, still there are much differences between them. Differences between GenericServlet and HttpServlet            GenericServlet           HttpServlet This class is present in javax.servlet package. This class is present …

Read moreHttpServlet class

GenericServlet Class

Java provides an alternative way to create a servlet in the form of GenericServlet. It is an abstract class present in javax.servlet package that implements Servlet, ServletConfig and Serializable interface. So, now our servlet program needs to extend GenericServlet. Although we are still using the servlet interface indirectly. This is an easier way to a …

Read moreGenericServlet Class

Servlet AsyncEvent and AsyncListener

AsyncEvent AsyncEvent is an asynchronous event class responsible to generate events. This class is present in javax.servlet package. This event occurs when various asynchronous tasks operating on ServletRequest get completed, expired or generate errors. ServletRequest is initiated by calling startAsync() method of ServletRequest type. Method of AsyncEvent               Method …

Read moreServlet AsyncEvent and AsyncListener