Professional Documents
Culture Documents
Syntax For JSP
Syntax For JSP
Syntax For JSP
Description
JSP Syntax
Legend
All tags are case sensitive. 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
[ ] = optional
bold = default
{ } = required choice
italics = user-defined
... = list of items
| = or
+ = can repeat
HTML Comment
Hidden Comment
Declaration
Expression
Scriptlet
Include Directive
Page Directive
Taglib Directive
</tagPrefix:name>
More information:
http://java.sun.com/products/jsp/
Description
JSP Syntax
<jsp:forward>
<jsp:getProperty>
<jsp:include>
<jsp:plugin>
<jsp:setProperty>
<jsp:setProperty name="beanInstanceName"
{ property="*" | property="propertyName" [ param="parameterName" ] |
property="propertyName" value="{string | <%= expression %>}" } />
<jsp:useBean>
Implicit Objects
Type
Scope
request
Subclass of javax.servlet.ServletRequest
Request
response
Subclass of javax.servlet.ServletResponse
Page
pageContext
javax.servlet.jsp.PageContext
Page
session
javax.servlet.http.HttpSession
Session
application
javax.servlet.ServletContext
Application
getMimeType, getRealPath
out
javax.servlet.jsp.JspWriter
Page
config
javax.servlet.ServletConfig
Page
getInitParameter, getInitParameterNames
page
java.lang.Object
Page
exception
java.lang.Throwable
Page
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.