Home >Common Problem >What is the difference between jsp and html?

What is the difference between jsp and html?

青灯夜游
青灯夜游Original
2020-09-28 17:20:2335557browse

Difference: 1. HTML runs on the client side and is interpreted and executed by the browser; JSP runs on the server side and requires a web container to provide a running environment. 2. HTML focuses on static data display and generates static web pages; JSP focuses on interacting with the server and is mainly developed with dynamic web pages. 3. HTML loads faster than JSP.

What is the difference between jsp and html?

The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.

HTML (Hypertext Markup Language) text markup language, it is a static page, an interpreted language like JavaScript, why is it called an interpreted language? Because, as long as you have a browser, it can be displayed normally without the need for a designated compilation tool. Just write HTML tags in the TXT document and it will be OK.

JSP (Java Server Page) looks at this meaning and you know that it is a Java server page, so it is dynamic. It needs to be compiled by JDK and then the content is sent to the client for display. We all know that Java After the file is compiled, a class file will be generated, and it is this class file that will eventually be executed. The same is true for JSP, which must also be compiled into a class file! JSP not only needs to be compiled, it also needs to be translated. First, JSP is translated into a Servlet file, and then compiled into a class file.

The difference between JSP and HTML

Different operating mechanisms

HTML runs on the client , is a markup language that is interpreted and executed by the browser; JSP runs on the server side and requires a web container to provide a running environment.

HTML is a client-side technology that provides a way to describe the structure of text-based information in a document. JSP is a server-side technology that provides a dynamic interface for continuously changing data and dynamically calling server operations.

Different technologies used

HTML is a client-side technology that provides a way to describe the text-based information structure in a document. JSP is a server-side technology that provides a dynamic interface for continuously changing data and dynamically calling server operations.

The difference on web pages:

HTML generates static web pages; JSP generates dynamic web pages.

JSP is used for the production of dynamic pages, while HTML is generally used for the production of static pages. The content of dynamic pages is generally generated by server-side programs. Different people access the page at different times, and the displayed content may be different.

After the web designer writes the server-side page program, there is no need for manual control. The page content will automatically change according to the arrangement of the page program.

Different purposes

HTML focuses on static data display, JSP focuses on interacting with the server, and is mainly developed with dynamic web pages.

Differences in writing:

HTML is a web page writing format standardized by w3c, a unified protocol language, and a static web page. Most of the web pages you browse online are based on HTML language. JSP is a dynamic language based on which JSP can implement all tasks of HTML.

Insertion of Java code

HTML does not allow Java code to be placed in the page; JSP allows java code to be placed in the JSP page.

SPEED

HTML loads faster when running on your local computer. The JSP takes some time to load because it has to interact with the web server.

For more programming-related knowledge, please visit: Programming Teaching! !

The above is the detailed content of What is the difference between jsp and html?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn