Difference between JSP and HTML, and between JSPHTML

Source: Internet
Author: User

Difference between JSP and HTML, and between JSPHTML
HTML (HypertextMarkupLanguage) text markup Language. It is a static page. It is the same as an explanatory Language as JavaScript. Why is it an explanatory Language? Because, as long as you have a browser, it can be displayed normally, without the need to specify the compilation tool, you only need to write the HTML mark in the TXT document.
JSP (JavaServerPage) you can see that it is a Page on the Java server, so it is dynamic. It needs to be compiled by JDK and sent to the client for display. We all know that, after the Java file is compiled, a class file will be generated, and the class file will be executed eventually. The same is true for JSP. It will also be compiled into a class file! JSP does not only need to be compiled, but also needs to be translated. First, convert JSP into a Servlet File and compile it into a class file. When the user accesses JSP, the class file is executed ......

1. The simplest difference is that HTML can be opened directly. jsp can only be opened on servers such as Tomact.
2. the HTML page is defined as a static page that can be directly run, and the JSP page is a dynamic page that needs to be converted to servlet during running.
3. their headers are different. This is the JSP Header "<% @ page language =" java "import =" java. util. * "pageEncoding =" gbk "%>" contains the encoding format in the header and the imported package.
4. Java code can also be written in jsp, but html does not <%>

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.