The difference between the Compilation instruction and action instruction in JSP is two points:

Source: Internet
Author: User

The difference between the Compilation instruction and action instruction in JSP is two points:

Differences between the Compilation instruction and action instruction in JSP

1. The compile command notifies the Servlet engine to process messages, and the Action Command is only the script action during running.

2. The compilation command works when JSP is compiled into Servlet, and the action command can be replaced with JSP script, which is the standardized writing method of JSP script.


What are the differences between the compilation commands and action elements on jsp pages?

JSP command:
Expression <% @ include tile = "" %>
This command only contains static files. It cannot be a dynamic address without any parameters. The server will compile the files that contain recent files.

JSP action elements:
Expression <JSP: include page = "">
It can contain static or dynamic files. When a static file is included, the server does not compile the contained file. When a dynamic file is included, the server compiles the dynamic file, the system automatically determines whether the file is dynamic or static.
Unlike the include command, this action element inserts a specified file into the server's response output only when the JSP page is requested by the user.

What are the differences between actions and commands in JSP?

Hello, use include for example.
The include command is a command in the compilation phase. That is, the content of the file contained in include is inserted into the JSP file during compilation. the JSP Engine judges that the JSP page has not been modified, otherwise, it is deemed to have been modified. Because the contained file is inserted during compilation, if only the content of the include file is modified but not the JSP file is not modified, the structure will not be changed, therefore, you can directly execute an existing bytecode file without re-compiling it. Therefore, it is appropriate to use the include command for infrequently changed content,

If the required content changes frequently, the Action Element <jsp: include> is required.

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.