JSPsyntax
JSPsyntax
Output Comment Generates a comment that is sent to the <!-- comment [ <%= expression %> ] -->
client in the viewable page source.
Hidden Comment Documents the JSP page, but is not sent <%-- comment --%>
to the client.
Scriptlet Contains a code fragment valid in the <% code fragment %>
page scripting language.
Include Directive Includes a file of text or code in the JSP <%@ include file="relativeURL" %>
source file.
Page Directive Defines attributes that apply to an entire <%@ page [ language="java" ] [ extends="package.class" ] [ import= " { package.class | package.* } , ... " ]
JSP page. [ session="true|false" ] [ buffer="none|8kb|sizekb" ] [ autoFlush="true|false" ]
[ isThreadSafe="true|false" ] [ info="text" ] [ errorPage="relativeURL" ]
[ contentType="mimeType [ ; charset=characterSet ]" | "text/html ; charset=ISO-8859-1" ]
[ isErrorPage="true|false" ] %>
Taglib Directive Defines a tag library and prefix for the <%@ taglib uri="URIToTagLibrary" prefix="tagPrefix" %>
custom tags used in the JSP page.
custom tag:
<tagPrefix:name attribute="value"+ ... />
<tagPrefix:name attribute="value"+ ... > other tags </tagPrefix:name>
<jsp:forward> Forwards a client request to an HTML <jsp:forward page="{ relativeURL | <%= expression %> }" />
file, JSP file, or servlet for processing.
<jsp:getProperty> Gets the value of a Bean property so <jsp:getProperty name="beanInstanceName" property="propertyName" />
that you can display it in a JSP page.
<jsp:include> Includes data in a JSP page from <jsp:include page="{ relativeURL | <%= expression %> }" flush="true" />
another file, without parsing the data.
<jsp:plugin> Downloads a Java plugin to the client <jsp:plugin type="bean|applet" code="classFileName" codebase="classFileDirectoryName"
Web browser to execute an applet or [ name="instanceName" ] [ archive=" URIToArchive, ... " ] [ align="bottom|top|middle|left|right" ]
Bean. [ height="displayPixels" ] [ width="displayPixels" ] [ hspace="leftRightPixels" ] [ vspace="topBottomPixels" ]
[ jreversion="JREVersionNumber | 1.1" ] [ nspluginurl="URLToPlugin" ] [ iepluginurl="URLToPlugin" ] >
</jsp:plugin>
Implicit Objects Type Scope Some Useful Methods (see class or interface for others)
response Subclass of javax.servlet.ServletResponse Page Not typically used by JSP page authors
© 1999 Sun Microsystems, Inc. All rights reserved. Sun, Sun Microsystems, the Sun logo, Java, the Java Coffee Cup logo, JavaServer Pages, and the Duke logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Printed in USA 08/99 ZE1294-1