JSP
JSP is servlet (server applet) : In fact, the code translated by JSP is a servlet, which means that each JSP page is actually a servlet. Since every JSP is a servlet, it is helpful to have some knowledge of servlets and how the server handles servlets. From this we can recognize other technologies that are also applicable to JSP.
Servlet
Servlet (Java server applet) is a server-side program written in Java, which is called and executed by the server-side, and is a Java class written according to the Servlet's own specifications.
Difference between JSP and servlet
- The difference between servlet and jsp is that there is no built-in object in servlet. For static HTML, servlet uses page output stream to output line by line.
- JSPs are compiled into Servlets
- Jsp is better at page display, Servlet is better at logic control