HTML (hypertextMarkupLanguage) Text Markup Language, which is a static page, and JavaScript as the explanatory language, why is it interpreted language? Because, as long as you have a browser then it can be displayed normally, without the need for the specified compilation tool, just write the HTML tag in the TXT document OK.
JSP (JavaServerPage ) See this meaning is the Java Server page, so it is dynamic, it needs to be compiled after the JDK to send the content to the client to display, we all know that the Java file compiled will produce a class file, the final execution is this class file, JSP is also the same, it will be compiled into a class file! JSP not only to compile, it has to be translated, first the JSP translated into a servlet file, and then compiled into a class file. When the user accesses the JSP, it executes the class file and finally ...
1. The simplest difference is that HTML can be opened directly, JSP can only be published to Tomact and other servers to open.
2. The definition on the HTML page is a static page can be run directly, the JSP page is a dynamic page which needs to be converted into a servlet when it runs.
3. Their header is different, this is the head of the JSP "<%@ page language=" java "import=" java.util.* "pageencoding=" GBK "%>" in the table header has encoded format and poured into the package and so on.
4. It is also very good to distinguish between the use of <%%> in the JSP can write Java code, and HTML does not have <%%>
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
The difference between JSP and HTML