Servlet

Servlet RequestDispatcher And SendRedirect

There are two methods in servlet to dispatch user requests to other web resources such as JSP, HTML, or another servlet in the same or different web applications. They are RequestDispatcher interface and HttpServletResponse‘s sendRedirect() method. RequestDispatcher is used to dispatch requests to the resource run in the same web applications, and sendRedirect() can be …

Servlet RequestDispatcher And SendRedirect Read More »

Servlet Overview

The website consists of static resources and dynamic resources. Static resources include Html page, javascript, CSS, images, etc. And dynamic resources include CGI, Servlet, JSP, etc. In this article, we will give you a general explanation about Web Applications, J2EE Servlet, and CGI. We will also compare them to point out the advantage and disadvantages …

Servlet Overview Read More »

Servlet Life Cycle

Servlet is managed by the servlet container, the container manages the entire lifecycle of the servlet. When the servlet container startup, it will initialize several servlet instances, at this time the servlet init() method will be invoked. When the servlet container receives an HTTP request, it will execute the servlet’s service() method, and when the …

Servlet Life Cycle Read More »

Clicky