Directive:<%@ include file= ""%>
Function: Reads the contents of the specified page. and combine the content with the original page. (This process is in the translation phase: The JSP is transformed into a servlet stage), the code that was introduced into the file is added to the introduction page to synthesize a file.
action: < Jsp:include page= "Dae. JSP "flush=" true "/>
role: The Include action element is executed during the request processing phase, where the request processing phase is explained. The JSP container is responsible for invoking the JSP page implementation class to process each request and generate an answer, in addition to the above-mentioned conversion of the JSP page into a servlet. This stage is called the request processing phase. The request processing phase executes only the class file.
So when we introduce a page as an include action element, we actually just reference the date. JSP this file is converted and generated after the servlet class file is compiled.
<c:import>
In addition to assigning parameters and managing local file contents, c:import You can also introduce content from external sites. Use c:import The real advantage of is that it can introduce content or Web applications from external Web sites. As you learned jsp:includes earlier, you might have noticed that we use the file property to specify static content for the include. The file property, as its name implies, allows you to introduce the contents of a local file. c:import The corresponding property of is , which is also as its name implies, enables you to introduce any URL. c:import not only can use the contents of a local file to populate your Web pages, but it also allows you to introduce the contents of any URL, so that the content of other sites can be truly flexible to suit the look and feel of your own site.
<jsp:include> and <c:import>