Elements in the JSP page, explain: Three annotations, will print to the client, and the remaining two are ignored by the JSP engine. Second, template element: refers to the static HTLM or XML content in the JSP, which affects the structure of the page and theesthetics, but that is a business, it is unrelated to programmers. Third, scripting elements: including declaration, expression (Expression), and scriptlets, in addition to some minor differences, ScriptleTs can replace the first two functions. Fourth, instruction elements: JSP instructions are messages sent by JSP to the JSP package container. They are used to set the full game, such as class declarations, the way to implement, and output content types, etc., and do not generate any output to the customer. It only affects this JSP file. 1. Page instruction: Used to define and operate the properties of many important pages, these properties communicate with the JSP package container. Anywhere in JSP, in any order, one page can contain any number of PAGE instructions. However, in addition to the Import instruction, other instructions can only appear once. Several important PAGE instructions: <% @ page import = "java.io. *, Java.util. *"%> // Import package <% @ buffer = ""%> // Define buffering to customer output stream model. <% @ Info = ""%> // You can use servlet.getServletInfo () to get this string <% @ iSerrorPage = ""%> <% @ ErrorPage = ""%>
Here is the sample code of this mark: <% @ page contenttype = "text / html; charset = GB2312" Language = "java"%>
<% @ include file = "static.html"%> <% // just contains files into%> goto two ->