JSP contains files
<% @ include file = "Relativeuri" %> //perform loading in the translation phase, for example: Verifying whether the login is passed
The include directive element of the JSP reads the contents of the specified page. and combine the content with the original page. (This process is done during the translation phase: that is, the JSP is transformed into a servlet.)
Translation phase:
JSP pages cannot be passed to the browser intact, and all JSP elements must first be processed by the server. This is done by passing the JSP page into a servlet and then executing the servlet. The server needs a JSP container to process the JSP pages. The JSP container is usually implemented in the context of the servlet, which is configured to handle all requests to the JSP page.
The JSP container attaches importance to translating the JSP page into a servlet (called the JSP page implementation Class-JSP page implementation Class) and compiles the servlet. These two steps make up the translation phase
<pageflush/> //load is performed during the request processing phase (runtime), For example: it is closely related to the current page data.
Introduces the answer text that is innate by the execution page or servlet.
Request Processing phase:
The JSP container, in addition to the above-mentioned emphasis on translating JSP pages into Servlets , also attaches importance to invoking JSP page implementation classes to process each request and generate an answer . This phase is called the request processing phase . The request processing phase executes only class documents
Carrying parameters:
<jsp:include page= "<%=pageSelectedAtRuntime%>" flush= "true" >
<jsp:param name= "Fitstparamer" value= "Firstvalue" >
<jsp:param name= "Lastparamer" value= "Lastvalue" >
</jsp:include>
-----------------------------------------------------------------------------------------
Jump page:
It is recommended to use Response.sendredirect () instead of the <jsp:forward> command to implement page jumps.
Because when the non-cached output is set, if the JSO file already has data before using <jsp:forward>,
The file execution will go wrong. The specification is response.sendredirect ("****.jsp"), and at the same time, the jump on the page
Or when the link is open, you must not refuel in the parameters of the page, the URL parameter should be in English.
-----------------------------------------------------------------------------------------
Using El expressions, try to avoid <%%> this form of code, JSP only responsible for data presentation, not responsible for business logic.
The file is named lowercase, and the function + object is named in the way. Example: listcustomer.jsp addcustomer.jsp
Page Support minimum 1024x768 screen resolution (actual size is 960*434), that is, the horizontal scroll bar cannot appear
label to have width,height attribute
Page to define the background color, the system default value can be changed by the user arbitrarily.
JSP Coding Specification