The main manifestation at two points
1. JSP is a class servlet
JSP simple point is to use another set of simple rules written by the servlet program, it can write Java code, can also write HTML code, JAVASCRIPT,CSS and so on ..., However, the server side is first turned into a servlet program and then executed in the order in which the servlet executes.
JSP is a simplification of servlets, the use of JSP only need to complete the programmer needs to output to the client's content, JSP java script How to mosaic into a class, by the JSP container to complete. The servlet is a complete Java class, and the service method of this class is used to generate a response to the client.
JSPs are essentially servlets, but they are created differently.
Servlet is completely Java program code composition is good at process control and transaction processing and through the servlet to generate dynamic Web pages;
JSP is composed of HTML code and JSP tag, it is convenient to write Dynamic Web page, so we use servlet to control business process in practical application, and use JSP to generate Dynamic Web page. In the struts framework, the JSP is in the view layer of the MVC design pattern, and the servlet is in the control layer .
2, JSP focus on the view, servlet is mainly used for control logic.
The difference between JSP Servlets