In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "what is the meaning of include in jsp". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what does include mean in jsp"?
Elements allow you to include dynamic files and static files, and the results of these two include files are different. If the file is only static, then this inclusion simply adds the contents of the included file to the jsp file, and if the file is dynamic, the included file will also be executed by the Jsp compiler (similar to asp).
You can't tell from the file name whether a file is dynamic or static. For example, aspcn.asp may just contain some information and does not need to be executed. You can process both files at the same time, so you don't need to include them to determine whether the file is dynamic or static.
If the include file is dynamic, you can also pass parameter names and values using the.
Attribute
Page= "{relativeURL |}"
The parameter is a relative path, or an expression that represents a relative path.
Flush= "true"
Here you must use flush= "true", you cannot use false value. The default value is false
< jsp:param name="parameterName" value="{parameterValue | }" />+
Clause allows you to pass one or more parameters to a dynamic file
You can use more than one page to pass multiple parameters.
There are two forms of include in jsp, which are
< %@ include file=" "%> < jsp:include page=" " flush="true"/>The former is the instruction element and the latter is the behavior element. You can usually consider using include when some parts of all pages in your application, such as title, footer, and navigation bar, are the same. The include instruction element of jsp reads the contents of the specified page And integrate these contents with the original page. (this process takes place during the translation phase, when jsp is converted into servlet.)
There are two main differences between include and jsp:include.
One: in terms of execution time:
< %@ include file="relativeURI"%>It is executed in the translation phase.
< jsp:include page="relativeURI" flush="true" />It is executed in the request processing phase.
Second, the difference in the content of introduction:
< %@ include file="relativeURI"%>Introduce static text (html,jsp) to blend with JSP pages before they are converted to servlet.
Introduce the response text generated by the execution page or servlet.
In addition, in both uses, the file and page attributes are interpreted as a relative URI. If it begins with a slash, then it is an environment-dependent path. It is interpreted according to the prefix of the URI assigned to the application, and if it does not start with a slash, then it is the path associated with the page, which is interpreted according to the path of the page that introduced the file.
Thank you for your reading, the above is the content of "what does include in jsp mean?" after the study of this article, I believe you have a deeper understanding of what include means in jsp, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.