J2ee Column
Abstract: j2ee Column
* JSP: containers in the operation of the server process:
Vessels received a customer jsp file a request, it jsp file parser generation java servlet source files, then compile and then proceed to customer response.
* JSP syntax:
Directive # JSP
<% @ And%> settings and used only in the pages related to the properties of three commonly used commands
Page, include, taglib
1.page
<@ Page attribute = "value" attribute 2 = "2 value"%>
Page attributes:
Designated language scripting language, if repeated use, then use whichever is the first time
Example: <% @ page language = "java"%>
Java method specified procedures fragment of the names of properties and methods, including RMS attributes of the service, doGet, doPost
Example: <% @ page method = "doPost"%>
Designated import into the java package name and class name, the list "," separate, the use of this directive into many different packages
Example: <% @ page import = "java.io. *, java.util .*"%>
Content_type response to the outcome of the designated MIME types. The default type is "text / html"
Encoding format for the "ISO-8859-1" and the language attribute to the same language in common use as many instructions while
Whichever is first.
<% @ Page content_type = "text / html, GBK charset ="%>
Session = "ture | false" designated JSP pages use of any session, the default is true
<% @ Page session = "true"%>
ErrorPage = "error_url" designated abnormal Jump Pages
Example: <% @ page errorPage = "errorpage.jsp"%>
IsErrorPage = "ture | false"
JSP page that this is to deal with the abnormal website
<% @ Page isErrorPage = "true"%>
↑ Back
Tags: J2EE






