JavaSercer Pages Appendix A. JSP Elements (System web hosting) Syntax Reference
JavaSercer Pages Appendix A. JSP Elements Syntax Reference JSP defines three types of elements: directives, scripting elements, and action elements. In addition, you can define your own custom actions. This appendix contains descriptions of all JSP elements as well as the general syntax rules for custom actions. A.1 Directive Elements Directive elements are used to specify information about the page itself, especially information that doesn’t differ between requests for the page. The general directive syntax is: <%@ directiveName attr1="value1" attr2="value2" %> The attribute values can be enclosed with single quotes instead of double quotes. The directive name and all attribute names are case-sensitive. A.1.1 include Directive The include directive includes a static file, merging its content with the including page before the combined result is converted to a JSP page implementation class. The include directive supports the attribute described in Table A.1. Table A.1, include Directive Attribute Attribute Name Default Description file No default A page-relative or context-relative URI path for the file to include A page can contain multiple include directives. The including page and all included pages together form what is called a JSP translation unit. Example: <%@ include file="header.html" %> A.1.2 page Directive The page directive defines page-dependent attributes, such as scripting language, error page, and buffering requirements. It supports the attributes described in Table A.2. Table A.2, page Directive Attributes Attribute Name Default Description autoFlush true Set to true if the page buffer should be flushed automatically when it’s full, or to false if an exception should be thrown when it’s full. buffer 8kb Specifies the buffer size for the page. The value must be expressed as the size in kilobytes followed by kb, or be the keyword none to disable buffering. contentType text/html The MIME type for the response generated by the page, and optionally the charset for the source page as well as the response; e.g., text/html;charset=Shift_JIS. errorPage No default A page-relative or context-relative URI path for the JSP page to forward to if an exception is thrown by code in the page. extends No default The fully qualified name of a Java class that the generated JSP page implementation class extends. The class must implement the JspPage or HttpJspPage interface in the javax.servlet.jsp package. Note that the recommendation is to not use this attribute. Specifying your own superclass restricts the JSP container’s ability to provide a specialized, high-performance superclass. page 260
Hint: If you are looking for good and high quality web space to host and run your java application check Vision java web hosting services