Home > Java > javaTutorial > body text

What language is used for jsp?

(*-*)浩
Release: 2019-06-05 17:57:20
Original
3105 people have browsed it

The full name of JSP is Java Server Pages, which is a dynamic web page development technology. It uses JSP tags to insert Java code in HTML web pages. Tags usually start with <% and end with %>.

What language is used for jsp?

JSP is a Java servlet that is mainly used to implement the user interface part of Java web applications. JSP can be written using HTML code, JS code, CSS code, Java code snippets, and embedded JSP operations and commands.

JSP obtains user input data through web forms, accesses databases and other data sources, and then dynamically creates web pages.

JSP tags have a variety of functions, such as accessing databases, recording user selection information, accessing JavaBeans components, etc., and can also transfer control information and shared information in different web pages.

Advantages of JSP

Compared with ASP:

The dynamic part is written in Java, so it is more powerful and easy to use and can be transplanted to many different Server and operating system

Compared with PHP:

Better tool support

Compared with Servlet:

Creating HTML is more convenient

Compare with Javascript:

How it works

The following steps show how the web server uses JSP to create a web page:

Just Like any other normal web page, your browser sends an HTTP request to the server.

The Web server recognizes that this is a request for a JSP web page and passes the request to the JSP engine. This is done using a URL or a .jsp file.

The JSP engine loads JSP files from disk and converts them into servlets. This transformation simply converts all template text into println() statements and converts all JSP elements into Java code.

The JSP engine compiles the servlet into an executable class and passes the original request to the servlet engine.

A certain component of the Web server will call the servlet engine, and then load and execute the servlet class. During execution, the servlet generates output in HTML format and embeds it in the HTTP response and submits it to the Web server.

The Web server returns the HTTP response to your browser in the form of a static HTML web page.

Ultimately, the web browser processes the dynamically generated HTML web pages in the HTTP response as if it were a static web page.

The above is the detailed content of What language is used for jsp?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!