What is JSP
The JSP full name is Java Server Pages, the Chinese name is a Java Servers page, is a kind of dynamic page technology, the logic separates from the servlet. Inserts Java program segments (scriptlet) and JSP tags (tag) into the traditional Web page HTML (subset of standard universal Markup Language) files (*.htm,*.html) to form a JSP file with a suffix named (*.jsp) why
In Dynamic Web pages, most of them are still stationary, and if you use the servlet to output content that only local content needs to change dynamically, then all static content will need to be generated with Java program code. In this way, the entire servlet program's code is very bloated. But programmers are not necessarily familiar with graphic design and HTML statement writing. All is a trap, Sun introduced JSP and HTML relationship HTML is a Hypertext Markup language, using Microsoft's own Notepad or WordPad can be written, mainly for writing static pages. What static page it is. is the program, Web page, plug-ins and components that run on the client, note that it can play a dynamic video or a picture, the meaning of the static web page can be understood as copy to where all can run.
JSP is the Java Server Web page technology, must be published to Tomcat and other servers to run the conversion to the servlet, of course, it is a dynamic page.
Working principle
The client makes the request, requests for the JSP, the container to find the corresponding servlet to handle, transforms from the test.jsp to the Test.java; Turn the servlet into a test.class file again, load the class file into the container, create an instance in the container, initialize it, and then return the HTML file to the client through the Jspservice method in the servlet instance.
A simple understanding of the individual, if there is a problem, please comment the description ~