How JSP works (small pick)

Source: Internet
Author: User
A JSP is a servlet, but it doesn't work the same way as HttpServlet. HttpServlet is deployed to the server after the source code is compiled into a class file, and is first compiled and then deployed. JSP is the first deployment of the source code after the compilation of a class file, first deployed after the compilation. The JSP is compiled to the Httpjsppage class (a subclass of the interface Servlet) the first time the client requests it. This class is temporarily stored in the server's working directory by the server. When the client first requests x.jsp, Tomcat first translates x.jsp into the standard Java source X_jsp.java, which is stored in the tomcat\work\catalina\localhost\jsp\org\apach\jsp directory and the X _jsp.java compiled as a class file X_jsp.class. The class file is the servlet corresponding to the JSP. After compiling, run the class file to respond to client requests. When the client accesses x.jsp in the future, the server will no longer recompile the JSP file, but instead call X_jsp.class directly to respond to the client request.


How JSP works (small pick)

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.