A pair of single quotes is equivalent to a pair of double quotes.
Spaces are not allowed between an equals sign and an attribute value.
plain text = required bold = default italics = user-defined | = or
[ ] = optional { } = required choice ... = list of items + = can repeat
HTML Comment Creates a comment that is sent to the client in the viewable page source.
Hidden Comment Documents the JSP file, but is not sent to the client.
<%-- comment --%>
Declaration Declares variables or methods valid in the page scripting language.
<%! declaration; [ declaration; ]+ ... %>
Expression Contains an expression valid in the page scripting language.
<%= expression %>
Scriptlet Contains a code fragment valid in the page scripting language.
<% code fragment of one or more lines %>
Include Directive Includes a static file, parsing the file’s
JSP elements.
<%@ include file="relativeURL" %>
Page Directive Defines attributes that apply to an entire JSP page.
<%@ page [ language="java" ] [ extends="package.class" ] [ import="{package.class | package.*} , ... " ] [ 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 custom tags used in the JSP page.
<%@ taglib uri="URIToTagLibrary" prefix="tagPrefix" %>
file, JSP file, or servlet for processing.
{ /> |
> [
you can display it in a result page.
{ /> |
> [
browser to execute an applet or bean.
[ height="displayPixels" ] [ width="displayPixels" ] [ hspace="leftRightPixels" ] [ vspace="topBottomPixels" ]
[ jreversion="JREVersionNumber | 1.1" ] [ nspluginurl="URLToPlugin" ] [ iepluginurl="URLToPlugin" ] >
[
[
bean.
property="propertyName" value="{string | <%= expression %>}" } />
specific name and scope.
beanName="{package.class | <%= expression %>}" type="package.class" }
{ /> | > other elements
Implicit Objects Type Scope Some Useful Methods (see class or interface for others)
request Subclass of javax.servlet.ServletRequest Request getAttribute, getParameter, getParameterNames, getParameterValues, setAttribute
response Subclass of javax.servlet.ServletResponse Page Not typically used by JSP page authors
pageContext javax.servlet.jsp.PageContext Page findAttribute, getAttribute, getAttributesScope, getAttributeNamesInScope, setAttribute
session javax.servlet.http.HttpSession Session getAttribute, getId, setAttribute
application javax.servlet.ServletContext Application getAttribute, getMimeType, getRealPath, setAttribute
out javax.servlet.jsp.JspWriter Page clear, clearBuffer, flush, getBufferSize, getRemaining
config javax.servlet.ServletConfig Page getInitParameter, getInitParameterNames
page java.lang.Object Page Not typically used by JSP page authors
exception java.lang.Throwable Page getMessage, getLocalizedMessage, printStackTrace, toString
No comments:
Post a Comment