The concept of JSP and Servlet for JSP for beginners, it is rather unclear, the following summarizes some of my personal views:
(1). Simply for the Jsp is Java code that contains html, which contains the html of the servlet is a Java code;
(2). Jsp ultimately be interpreted as a servlet and compile the re-implementation, Jsp is just another servlet preparation methods;
(3). Jsp good at that, servlet good at data processing, in the MVC in three-tier structure, Jsp is responsible for V (view), servlet is responsible for C (control), each with advantages and carry out their duties;
Servlet in the functional realization of the fact is the same can be said to be able to use Jsp achieved, Servlet can be achieved, but from the application point of view, Jsp presentation layer is more suitable for things because he has tag support, while the Servlet suitable the data logic layer of the data processing.
Serverlet is a Java class, Web application should be the HttpServerlet, which extends from the GenericServerlet (This is a partial realization of Serverlet interface abstract class), Serverlet class biggest advantage is the ability to provide request / response server functionality, when the there is a request submitted to the Serverlet, he was the implementation of its own service (request, response) method.
Is to show no logic function can not process the data to determine how to do?
How to solve but the server can use Java code to do the control of the servlet is the client and server connection all the features of an interface