Introduction to JSP and working principle __JS

Source: Internet
Author: User
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 ~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.