EJB & JSP: Java On The Edge, Unlimited Edition by Lou Marco ISBN: 0764548026 Your Guide to Cutting-Edge J2EE Programming Techniques. Programmable JSP Elements Programmable JSP elements are divided into five categories: directives, scripting elements, declarations, expressions, and actions. Let s take a look at the elements in the first category. JSP Directives JSP directives are JSP elements that send messages to the JSP container. Directives affect the overall structure of the servlet generated from the JSP page. JSP directives do not produce any output to the generated document. The general format of a JSP directive is: <%@ directiveType attributelist %> The first word, directiveType, is one of three values: page, include, and taglib. The second word, attributelist, is one or more name-value pairs; the name part is the name of the attribute relevant to the directive type and the value is a quoted string relevant to the attribute name. If the directive contains more than one name-value pair, the distinct pairs are delimited by one or more spaces, such as the following JSP directive: <%@ page buffer="8k" language="java" %> Note The syntax for name-value pairs is the same as the syntax for XML name-value pairs. See Appendix D, XML Overview, for an overview of XML syntax. Pay heed to the at (@) sign after the <% at the start of the directive; pay equal attention to the absence of the "at" sign at the end of the directive. Also note that the space between the start of the directive and the directiveType is not required. The page Directive The page directive enables you to communicate a number of important attributes to the generated servlet. Using the page
Please check java servlet web hosting services, here you will find professional-grade java servlet web hosting with the best prices.

Leave a Reply