All Classes (JavaServer Pages API Documentation)

 All Classes
BodyContent
BodyTag
BodyTagSupport
DynamicAttributes
ELException
ELParseException
ErrorData
Expression
ExpressionEvaluator
FunctionInfo
FunctionMapper
HttpJspPage
IterationTag
JspContext
JspEngineInfo
JspException
JspFactory
JspFragment
JspPage
JspTag
JspTagException
JspWriter
PageContext
PageData
SimpleTag
SimpleTagSupport
SkipPageException
Tag
TagAdapter
TagAttributeInfo
TagData
TagExtraInfo
TagFileInfo
TagInfo
TagLibraryInfo
TagLibraryValidator
TagSupport
TagVariableInfo
TryCatchFinally
ValidationMessage
VariableInfo
VariableResolver


BodyContent (JavaServer Pages API Documentation)

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class BodyContent

java.lang.Object
    extended by java.io.Writer
        extended by javax.servlet.jsp.JspWriter
            extended by javax.servlet.jsp.tagext.BodyContent
public abstract class BodyContent
extends JspWriter

An encapsulation of the evaluation of the body of an action so it is available to a tag handler. BodyContent is a subclass of JspWriter.

Note that the content of BodyContent is the result of evaluation, so it will not contain actions and the like, but the result of their invocation.

BodyContent has methods to convert its contents into a String, to read its contents, and to clear the contents.

The buffer size of a BodyContent object is unbounded. A BodyContent object cannot be in autoFlush mode. It is not possible to invoke flush on a BodyContent object, as there is no backing stream.

Instances of BodyContent are created by invoking the pushBody and popBody methods of the PageContext class. A BodyContent is enclosed within another JspWriter (maybe another BodyContent object) following the structure of their associated actions.

A BodyContent is made available to a BodyTag through a setBodyContent() call. The tag handler can use the object until after the call to doEndTag().

Field Summary
Fields inherited from class javax.servlet.jsp.JspWriter
autoFlush, bufferSize, DEFAULT_BUFFER, NO_BUFFER, UNBOUNDED_BUFFER
Fields inherited from class java.io.Writer
lock
Constructor Summary
protected BodyContent(JspWriter e)
Protected constructor.
Method Summary
 void clearBody()
Clear the body without throwing any exceptions.
 void flush()
Redefined flush() so it is not legal.
 JspWriter getEnclosingWriter()
Get the enclosing JspWriter.
abstract  java.io.Reader getReader()
Return the value of this BodyContent as a Reader.
abstract  java.lang.String getString()
Return the value of the BodyContent as a String.
abstract  void writeOut(java.io.Writer out)
Write the contents of this BodyContent into a Writer.
Methods inherited from class javax.servlet.jsp.JspWriter
clear, clearBuffer, close, getBufferSize, getRemaining, isAutoFlush, newLine, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println
Methods inherited from class java.io.Writer
write, write, write, write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BodyContent

protected BodyContent(JspWriter e)
Protected constructor. Unbounded buffer, no autoflushing.

Parameters:
e - the enclosing JspWriter
Method Detail

flush

public void flush()
           throws java.io.IOException
Redefined flush() so it is not legal.

It is not valid to flush a BodyContent because there is no backing stream behind it.

Specified by:
flush in class JspWriter
Throws:
java.io.IOException - always thrown

clearBody

public void clearBody()
Clear the body without throwing any exceptions.

getReader

public abstract java.io.Reader getReader()
Return the value of this BodyContent as a Reader.

Returns:
the value of this BodyContent as a Reader

getString

public abstract java.lang.String getString()
Return the value of the BodyContent as a String.

Returns:
the value of the BodyContent as a String

writeOut

public abstract void writeOut(java.io.Writer out)
                       throws java.io.IOException
Write the contents of this BodyContent into a Writer. Subclasses may optimize common invocation patterns.

Parameters:
out - The writer into which to place the contents of this body evaluation
Throws:
java.io.IOException - if an I/O error occurred while writing the contents of this BodyContent to the given Writer

getEnclosingWriter

public JspWriter getEnclosingWriter()
Get the enclosing JspWriter.

Returns:
the enclosing JspWriter passed at construction time
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD
Copyright © 1999-2002 The Apache Software Foundation. All Rights Reserved.


BodyTag (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Interface BodyTag

All Superinterfaces:
IterationTag, JspTag, Tag
All Known Implementing Classes:
BodyTagSupport
public interface BodyTag
extends IterationTag

The BodyTag interface extends IterationTag by defining additional methods that let a tag handler manipulate the content of evaluating its body.

It is the responsibility of the tag handler to manipulate the body content. For example the tag handler may take the body content, convert it into a String using the bodyContent.getString method and then use it. Or the tag handler may take the body content and write it out into its enclosing JspWriter using the bodyContent.writeOut method.

A tag handler that implements BodyTag is treated as one that implements IterationTag, except that the doStartTag method can return SKIP_BODY, EVAL_BODY_INCLUDE or EVAL_BODY_BUFFERED.

If EVAL_BODY_INCLUDE is returned, then evaluation happens as in IterationTag.

If EVAL_BODY_BUFFERED is returned, then a BodyContent object will be created (by code generated by the JSP compiler) to capture the body evaluation. The code generated by the JSP compiler obtains the BodyContent object by calling the pushBody method of the current pageContext, which additionally has the effect of saving the previous out value. The page compiler returns this object by calling the popBody method of the PageContext class; the call also restores the value of out.

The interface provides one new property with a setter method and one new action method.

Properties

There is a new property: bodyContent, to contain the BodyContent object, where the JSP Page implementation object will place the evaluation (and reevaluation, if appropriate) of the body. The setter method (setBodyContent) will only be invoked if doStartTag() returns EVAL_BODY_BUFFERED and the corresponding action element does not have an empty body.

Methods

In addition to the setter method for the bodyContent property, there is a new action method: doInitBody(), which is invoked right after setBodyContent() and before the body evaluation. This method is only invoked if doStartTag() returns EVAL_BODY_BUFFERED.

Lifecycle

Lifecycle details are described by the transition diagram below. Exceptions that are thrown during the computation of doStartTag(), setBodyContent(), doInitBody(), BODY, doAfterBody() interrupt the execution sequence and are propagated up the stack, unless the tag handler implements the TryCatchFinally interface; see that interface for details.

Lifecycle Details Transition Diagram for BodyTag

Empty and Non-Empty Action

If the TagLibraryDescriptor file indicates that the action must always have an empty element body, by an <body-content> entry of "empty", then the doStartTag() method must return SKIP_BODY. Otherwise, the doStartTag() method may return SKIP_BODY, EVAL_BODY_INCLUDE, or EVAL_BODY_BUFFERED.

Note that which methods are invoked after the doStartTag() depends on both the return value and on if the custom action element is empty or not in the JSP page, not how it's declared in the TLD.

If SKIP_BODY is returned the body is not evaluated, and doEndTag() is invoked.

If EVAL_BODY_INCLUDE is returned, and the custom action element is not empty, setBodyContent() is not invoked, doInitBody() is not invoked, the body is evaluated and "passed through" to the current out, doAfterBody() is invoked and then, after zero or more iterations, doEndTag() is invoked. If the custom action element is empty, only doStart() and doEndTag() are invoked.

If EVAL_BODY_BUFFERED is returned, and the custom action element is not empty, setBodyContent() is invoked, doInitBody() is invoked, the body is evaluated, doAfterBody() is invoked, and then, after zero or more iterations, doEndTag() is invoked. If the custom action element is empty, only doStart() and doEndTag() are invoked.

Field Summary
static int | EVAL_BODY_BUFFERED Request the creation of new buffer, a BodyContent on which to evaluate the body of this tag.
static int | EVAL_BODY_TAG Deprecated. As of Java JSP API 1.2, use BodyTag.EVAL_BODY_BUFFERED or IterationTag.EVAL_BODY_AGAIN.
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Method Summary
void | doInitBody() Prepare for evaluation of the body.
void | setBodyContent(BodyContent b) Set the bodyContent property.
Methods inherited from interface javax.servlet.jsp.tagext.IterationTag
doAfterBody
Methods inherited from interface javax.servlet.jsp.tagext.Tag
doEndTag, doStartTag, getParent, release, setPageContext, setParent

Field Detail

EVAL_BODY_TAG

public static final int EVAL_BODY_TAG
Deprecated. As of Java JSP API 1.2, use BodyTag.EVAL_BODY_BUFFERED or IterationTag.EVAL_BODY_AGAIN.

Deprecated constant that has the same value as EVAL_BODY_BUFFERED and EVAL_BODY_AGAIN. This name has been marked as deprecated to encourage the use of the two different terms, which are much more descriptive.

See Also:
Constant Field Values

EVAL_BODY_BUFFERED

public static final int EVAL_BODY_BUFFERED
Request the creation of new buffer, a BodyContent on which to evaluate the body of this tag. Returned from doStartTag when it implements BodyTag. This is an illegal return value for doStartTag when the class does not implement BodyTag.

See Also:
Constant Field Values
Method Detail

setBodyContent

public void setBodyContent(BodyContent b)
Set the bodyContent property. This method is invoked by the JSP page implementation object at most once per action invocation. This method will be invoked before doInitBody. This method will not be invoked for empty tags or for non-empty tags whose doStartTag() method returns SKIP_BODY or EVAL_BODY_INCLUDE.

When setBodyContent is invoked, the value of the implicit object out has already been changed in the pageContext object. The BodyContent object passed will have not data on it but may have been reused (and cleared) from some previous invocation.

The BodyContent object is available and with the appropriate content until after the invocation of the doEndTag method, at which case it may be reused.

Parameters:
b - the BodyContent
See Also:
doInitBody(), IterationTag.doAfterBody()

doInitBody

public void doInitBody()
                throws JspException
Prepare for evaluation of the body. This method is invoked by the JSP page implementation object after setBodyContent and before the first time the body is to be evaluated. This method will not be invoked for empty tags or for non-empty tags whose doStartTag() method returns SKIP_BODY or EVAL_BODY_INCLUDE.

The JSP container will resynchronize the values of any AT_BEGIN and NESTED variables (defined by the associated TagExtraInfo or TLD) after the invocation of doInitBody().

Throws:
JspException - if an error occurred while processing this tag
See Also:
IterationTag.doAfterBody()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BodyTagSupport (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class BodyTagSupport

java.lang.Object
    extended by javax.servlet.jsp.tagext.TagSupport
        extended by javax.servlet.jsp.tagext.BodyTagSupport
All Implemented Interfaces:
BodyTag, IterationTag, JspTag, java.io.Serializable, Tag
public class BodyTagSupport
extends TagSupport
implements BodyTag

A base class for defining tag handlers implementing BodyTag.

The BodyTagSupport class implements the BodyTag interface and adds additional convenience methods including getter methods for the bodyContent property and methods to get at the previous out JspWriter.

Many tag handlers will extend BodyTagSupport and only redefine a few methods.

See Also:
Serialized Form

Field Summary
protected  BodyContent bodyContent
The current BodyContent for this BodyTag.
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor Summary
BodyTagSupport()
Default constructor, all subclasses are required to only define a public constructor with the same signature, and to call the superclass constructor.
Method Summary
int | doAfterBody() After the body evaluation: do not reevaluate and continue with the page.
int | doEndTag() Default processing of the end tag returning EVAL_PAGE.
void | doInitBody() Prepare for evaluation of the body just before the first body evaluation: no action.
int | doStartTag() Default processing of the start tag returning EVAL_BODY_BUFFERED.
BodyContent | getBodyContent() Get current bodyContent.
JspWriter | getPreviousOut() Get surrounding out JspWriter.
void | release() Release state.
void | setBodyContent(BodyContent b) Prepare for evaluation of the body: stash the bodyContent away.
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent

Field Detail

bodyContent

protected BodyContent bodyContent
The current BodyContent for this BodyTag.

Constructor Detail

BodyTagSupport

public BodyTagSupport()
Default constructor, all subclasses are required to only define a public constructor with the same signature, and to call the superclass constructor. This constructor is called by the code generated by the JSP translator.

Method Detail

doStartTag

public int doStartTag()
               throws JspException
Default processing of the start tag returning EVAL_BODY_BUFFERED.

Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class TagSupport
Returns:
EVAL_BODY_BUFFERED
Throws:
JspException - if an error occurred while processing this tag
See Also:
Tag.doStartTag()

doEndTag

public int doEndTag()
             throws JspException
Default processing of the end tag returning EVAL_PAGE.

Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class TagSupport
Returns:
EVAL_PAGE
Throws:
JspException - if an error occurred while processing this tag
See Also:
Tag.doEndTag()

setBodyContent

public void setBodyContent(BodyContent b)
Prepare for evaluation of the body: stash the bodyContent away.

Specified by:
setBodyContent in interface BodyTag
Parameters:
b - the BodyContent
See Also:
doAfterBody(),
doInitBody(),
BodyTag.setBodyContent(javax.servlet.jsp.tagext.BodyContent)

doInitBody

public void doInitBody()
                throws JspException
Prepare for evaluation of the body just before the first body evaluation: no action.

Specified by:
doInitBody in interface BodyTag
Throws:
JspException - if an error occurred while processing this tag
See Also:
setBodyContent(javax.servlet.jsp.tagext.BodyContent),
doAfterBody(),
BodyTag.doInitBody()

doAfterBody

public int doAfterBody()
                throws JspException
After the body evaluation: do not reevaluate and continue with the page. By default nothing is done with the bodyContent data (if any).

Specified by:
doAfterBody in interface IterationTag
Overrides:
doAfterBody in class TagSupport
Returns:
SKIP_BODY
Throws:
JspException - if an error occurred while processing this tag
See Also:
doInitBody(), IterationTag.doAfterBody()

release

public void release()
Release state.

Specified by:
release in interface Tag
Overrides:
release in class TagSupport
See Also:
Tag.release()

getBodyContent

public BodyContent getBodyContent()
Get current bodyContent.

Returns:
the body content.

getPreviousOut

public JspWriter getPreviousOut()
Get surrounding out JspWriter.

Returns:
the enclosing JspWriter, from the bodyContent.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DynamicAttributes (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Interface DynamicAttributes

public interface DynamicAttributes

For a tag to declare that it accepts dynamic attributes, it must implement this interface. The entry for the tag in the Tag Library Descriptor must also be configured to indicate dynamic attributes are accepted.
For any attribute that is not declared in the Tag Library Descriptor for this tag, instead of getting an error at translation time, the setDynamicAttribute() method is called, with the name and value of the attribute. It is the responsibility of the tag to remember the names and values of the dynamic attributes.

Since:
2.0

Method Summary
 void setDynamicAttribute(java.lang.String uri, java.lang.String localName, java.lang.Object value)
Called when a tag declared to accept dynamic attributes is passed an attribute that is not declared in the Tag Library Descriptor.

Method Detail

setDynamicAttribute

public void setDynamicAttribute(java.lang.String uri,
                                java.lang.String localName,
                                java.lang.Object value)
                         throws JspException
Called when a tag declared to accept dynamic attributes is passed an attribute that is not declared in the Tag Library Descriptor.

Parameters:
uri - the namespace of the attribute, or null if in the default namespace.
localName - the name of the attribute being set.
value - the value of the attribute
Throws:
JspException - if the tag handler wishes to signal that it does not accept the given attribute. The container must not call doStartTag() or doTag() for this tag.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ELException (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.el
Class ELException

java.lang.Object
    extended by java.lang.Throwable
        extended by java.lang.Exception
            extended by javax.servlet.jsp.el.ELException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ELParseException
public class ELException
extends java.lang.Exception

Represents any of the exception conditions that arise during the operation evaluation of the evaluator.

Since:
2.0
See Also:
Serialized Form

Constructor Summary
ELException()
Creates an ELException with no detail message.
ELException(java.lang.String pMessage)
Creates an ELException with the provided detail message.
ELException(java.lang.String pMessage, java.lang.Throwable pRootCause)
Creates an ELException with the given detail message and root cause.
ELException(java.lang.Throwable pRootCause)
Creates an ELException with the given root cause.
Method Summary
 java.lang.Throwable getRootCause()
Returns the root cause.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ELException

public ELException()
Creates an ELException with no detail message.

ELException

public ELException(java.lang.String pMessage)
Creates an ELException with the provided detail message.

Parameters:
pMessage - the detail message

ELException

public ELException(java.lang.Throwable pRootCause)
Creates an ELException with the given root cause.

Parameters:
pRootCause - the originating cause of this exception

ELException

public ELException(java.lang.String pMessage,
                   java.lang.Throwable pRootCause)
Creates an ELException with the given detail message and root cause.

Parameters:
pMessage - the detail message
pRootCause - the originating cause of this exception
Method Detail

getRootCause

public java.lang.Throwable getRootCause()
Returns the root cause.

Returns:
the root cause of this exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ELParseException (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.el
Class ELParseException

java.lang.Object
    extended by java.lang.Throwable
        extended by java.lang.Exception
            extended by javax.servlet.jsp.el.ELException
                extended by javax.servlet.jsp.el.ELParseException
All Implemented Interfaces:
java.io.Serializable
public class ELParseException
extends ELException

Represents a parsing error encountered while parsing an EL expression.

Since:
2.0
See Also:
Serialized Form

Constructor Summary
ELParseException()
Creates an ELParseException with no detail message.
ELParseException(java.lang.String pMessage)
Creates an ELParseException with the provided detail message.
Methods inherited from class javax.servlet.jsp.el.ELException
getRootCause
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ELParseException

public ELParseException()
Creates an ELParseException with no detail message.

ELParseException

public ELParseException(java.lang.String pMessage)
Creates an ELParseException with the provided detail message.

Parameters:
pMessage - the detail message
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ErrorData (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp
Class ErrorData

java.lang.Object
    extended by javax.servlet.jsp.ErrorData
public final class ErrorData
extends java.lang.Object

Contains information about an error, for error pages. The information contained in this instance is meaningless if not used in the context of an error page. To indicate a JSP is an error page, the page author must set the isErrorPage attribute of the page directive to "true".

Since:
2.0
See Also:
PageContext.getErrorData()

Constructor Summary
ErrorData(java.lang.Throwable throwable, int statusCode, java.lang.String uri, java.lang.String servletName)
Creates a new ErrorData object.
Method Summary
java.lang.String | getRequestURI() Returns the request URI.
java.lang.String | getServletName() Returns the name of the servlet invoked.
int | getStatusCode() Returns the status code of the error.
java.lang.Throwable | getThrowable() Returns the Throwable that caused the error.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ErrorData

public ErrorData(java.lang.Throwable throwable,
                 int statusCode,
                 java.lang.String uri,
                 java.lang.String servletName)
Creates a new ErrorData object.

Parameters:
throwable - The Throwable that is the cause of the error
statusCode - The status code of the error
uri - The request URI
servletName - The name of the servlet invoked
Method Detail

getThrowable

public java.lang.Throwable getThrowable()
Returns the Throwable that caused the error.

Returns:
The Throwable that caused the error

getStatusCode

public int getStatusCode()
Returns the status code of the error.

Returns:
The status code of the error

getRequestURI

public java.lang.String getRequestURI()
Returns the request URI.

Returns:
The request URI

getServletName

public java.lang.String getServletName()
Returns the name of the servlet invoked.

Returns:
The name of the servlet invoked
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Expression (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.el
Class Expression

java.lang.Object
    extended by javax.servlet.jsp.el.Expression
public abstract class Expression
extends java.lang.Object

The abstract class for a prepared expression.

An instance of an Expression can be obtained via from an ExpressionEvaluator instance.

An Expression may or not have done a syntactic parse of the expression. A client invoking the evaluate() method should be ready for the case where ELParseException exceptions are raised.

Since:
2.0

Constructor Summary
Expression()
Method Summary
abstract  java.lang.Object evaluate(VariableResolver vResolver)
Evaluates an expression that was previously prepared.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Expression

public Expression()
Method Detail

evaluate

public abstract java.lang.Object evaluate(VariableResolver vResolver)
                                   throws ELException
Evaluates an expression that was previously prepared. In some implementations preparing an expression involves full syntactic validation, but others may not do so. Evaluating the expression may raise an ELParseException as well as other ELExceptions due to run-time evaluation.

Parameters:
vResolver - A VariableResolver instance that can be used at runtime to resolve the name of implicit objects into Objects.
Returns:
The result of the expression evaluation.
Throws:
ELException - Thrown if the expression evaluation failed.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ExpressionEvaluator (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.el
Class ExpressionEvaluator

java.lang.Object
    extended by javax.servlet.jsp.el.ExpressionEvaluator
public abstract class ExpressionEvaluator
extends java.lang.Object

The abstract base class for an expression-language evaluator. Classes that implement an expression language expose their functionality via this abstract class.

An instance of the ExpressionEvaluator can be obtained via the JspContext / PageContext

The parseExpression() and evaluate() methods must be thread-safe. That is, multiple threads may call these methods on the same ExpressionEvaluator object simultaneously. Implementations should synchronize access if they depend on transient state. Implementations should not, however, assume that only one object of each ExpressionEvaluator type will be instantiated; global caching should therefore be static.

Only a single EL expression, starting with '${' and ending with '}', can be parsed or evaluated at a time. EL expressions cannot be mixed with static text. For example, attempting to parse or evaluate "abc${1+1}def${1+1}ghi" or even "${1+1}${1+1}" will cause an ELException to be thrown.

The following are examples of syntactically legal EL expressions:

  • ${person.lastName}
  • ${8 * 8}
  • ${my:reverse('hello')}

Since:
2.0

Constructor Summary
ExpressionEvaluator()
Method Summary
abstract java.lang.Object | evaluate(java.lang.String expression, java.lang.Class expectedType, VariableResolver vResolver, FunctionMapper fMapper) Evaluates an expression.
abstract Expression | parseExpression(java.lang.String expression, java.lang.Class expectedType, FunctionMapper fMapper) Prepare an expression for later evaluation.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ExpressionEvaluator

public ExpressionEvaluator()
Method Detail

parseExpression

public abstract Expression parseExpression(java.lang.String expression,
                                           java.lang.Class expectedType,
                                           FunctionMapper fMapper)
                                    throws ELException
Prepare an expression for later evaluation. This method should perform syntactic validation of the expression; if in doing so it detects errors, it should raise an ELParseException.

Parameters:
expression - The expression to be evaluated.
expectedType - The expected type of the result of the evaluation
fMapper - A FunctionMapper to resolve functions found in the expression. It can be null, in which case no functions are supported for this invocation. The ExpressionEvaluator must not hold on to the FunctionMapper reference after returning from parseExpression(). The Expression object returned must invoke the same functions regardless of whether the mappings in the provided FunctionMapper instance change between calling ExpressionEvaluator.parseExpression() and Expression.evaluate().
Returns:
The Expression object encapsulating the arguments.
Throws:
ELException - Thrown if parsing errors were found.

evaluate

public abstract java.lang.Object evaluate(java.lang.String expression,
                                          java.lang.Class expectedType,
                                          VariableResolver vResolver,
                                          FunctionMapper fMapper)
                                   throws ELException
Evaluates an expression. This method may perform some syntactic validation and, if so, it should raise an ELParseException error if it encounters syntactic errors. EL evaluation errors should cause an ELException to be raised.

Parameters:
expression - The expression to be evaluated.
expectedType - The expected type of the result of the evaluation
vResolver - A VariableResolver instance that can be used at runtime to resolve the name of implicit objects into Objects.
fMapper - A FunctionMapper to resolve functions found in the expression. It can be null, in which case no functions are supported for this invocation.
Returns:
The result of the expression evaluation.
Throws:
ELException - Thrown if the expression evaluation failed.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


FunctionInfo (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class FunctionInfo

java.lang.Object
    extended by javax.servlet.jsp.tagext.FunctionInfo
public class FunctionInfo
extends java.lang.Object

Information for a function in a Tag Library. This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.

Since:
2.0

Constructor Summary
FunctionInfo(java.lang.String name, java.lang.String klass, java.lang.String signature)
Constructor for FunctionInfo.
Method Summary
java.lang.String | getFunctionClass() The class of the function.
java.lang.String | getFunctionSignature() The signature of the function.
java.lang.String | getName() The name of the function.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FunctionInfo

public FunctionInfo(java.lang.String name,
                    java.lang.String klass,
                    java.lang.String signature)
Constructor for FunctionInfo.

Parameters:
name - The name of the function
klass - The class of the function
signature - The signature of the function
Method Detail

getName

public java.lang.String getName()
The name of the function.

Returns:
The name of the function

getFunctionClass

public java.lang.String getFunctionClass()
The class of the function.

Returns:
The class of the function

getFunctionSignature

public java.lang.String getFunctionSignature()
The signature of the function.

Returns:
The signature of the function
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FunctionMapper (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.el
Interface FunctionMapper

public interface FunctionMapper

The interface to a map between EL function names and methods.

Classes implementing this interface may, for instance, consult tag library information to resolve the map.

Since:
2.0

Method Summary
 java.lang.reflect.Method resolveFunction(java.lang.String prefix, java.lang.String localName)
Resolves the specified local name and prefix into a Java.lang.Method.

Method Detail

resolveFunction

public java.lang.reflect.Method resolveFunction(java.lang.String prefix,
                                                java.lang.String localName)
Resolves the specified local name and prefix into a Java.lang.Method. Returns null if the prefix and local name are not found.

Parameters:
prefix - the prefix of the function, or "" if no prefix.
localName - the short name of the function
Returns:
the result of the method mapping. Null means no entry found.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


HttpJspPage (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp
Interface HttpJspPage

All Superinterfaces:
JspPage, javax.servlet.Servlet
public interface HttpJspPage
extends JspPage

The HttpJspPage interface describes the interaction that a JSP Page Implementation Class must satisfy when using the HTTP protocol.

The behaviour is identical to that of the JspPage, except for the signature of the _jspService method, which is now expressible in the Java type system and included explicitly in the interface.

See Also:
JspPage

Method Summary
 void _jspService(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
The _jspService()method corresponds to the body of the JSP page.
Methods inherited from interface javax.servlet.jsp.JspPage
jspDestroy, jspInit
Methods inherited from interface javax.servlet.Servlet
destroy, getServletConfig, getServletInfo, init, service

Method Detail

_jspService

public void _jspService(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                 throws javax.servlet.ServletException,
                        java.io.IOException
The _jspService()method corresponds to the body of the JSP page. This method is defined automatically by the JSP container and should never be defined by the JSP page author.

If a superclass is specified using the extends attribute, that superclass may choose to perform some actions in its service() method before or after calling the _jspService() method. See using the extends attribute in the JSP_Engine chapter of the JSP specification.

Parameters:
request - Provides client request information to the JSP.
response - Assists the JSP in sending a response to the client.
Throws:
javax.servlet.ServletException - Thrown if an error occurred during the processing of the JSP and that the container should take appropriate action to clean up the request.
java.io.IOException - Thrown if an error occurred while writing the response for this page.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


IterationTag (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Interface IterationTag

All Superinterfaces:
JspTag, Tag
All Known Subinterfaces:
BodyTag
All Known Implementing Classes:
BodyTagSupport, TagSupport
public interface IterationTag
extends Tag

The IterationTag interface extends Tag by defining one additional method that controls the reevaluation of its body.

A tag handler that implements IterationTag is treated as one that implements Tag regarding the doStartTag() and doEndTag() methods. IterationTag provides a new method: doAfterBody().

The doAfterBody() method is invoked after every body evaluation to control whether the body will be reevaluated or not. If doAfterBody() returns IterationTag.EVAL_BODY_AGAIN, then the body will be reevaluated. If doAfterBody() returns Tag.SKIP_BODY, then the body will be skipped and doEndTag() will be evaluated instead.

Properties There are no new properties in addition to those in Tag.

Methods There is one new methods: doAfterBody().

Lifecycle

Lifecycle details are described by the transition diagram below. Exceptions that are thrown during the computation of doStartTag(), BODY and doAfterBody() interrupt the execution sequence and are propagated up the stack, unless the tag handler implements the TryCatchFinally interface; see that interface for details.

Lifecycle Details Transition Diagram for IterationTag

Empty and Non-Empty Action

If the TagLibraryDescriptor file indicates that the action must always have an empty element body, by a <body-content> entry of "empty", then the doStartTag() method must return SKIP_BODY.

Note that which methods are invoked after the doStartTag() depends on both the return value and on if the custom action element is empty or not in the JSP page, not on how it's declared in the TLD.

If SKIP_BODY is returned the body is not evaluated, and then doEndTag() is invoked.

If EVAL_BODY_INCLUDE is returned, and the custom action element is not empty, the body is evaluated and "passed through" to the current out, then doAfterBody() is invoked and, after zero or more iterations, doEndTag() is invoked.

Field Summary
static int EVAL_BODY_AGAIN
Request the reevaluation of some body.
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Method Summary
 int doAfterBody()
Process body (re)evaluation.
Methods inherited from interface javax.servlet.jsp.tagext.Tag
doEndTag, doStartTag, getParent, release, setPageContext, setParent

Field Detail

EVAL_BODY_AGAIN

public static final int EVAL_BODY_AGAIN
Request the reevaluation of some body. Returned from doAfterBody. For compatibility with JSP 1.1, the value is carefully selected to be the same as the, now deprecated, BodyTag.EVAL_BODY_TAG,

See Also:
Constant Field Values
Method Detail

doAfterBody

public int doAfterBody()
                throws JspException
Process body (re)evaluation. This method is invoked by the JSP Page implementation object after every evaluation of the body into the BodyEvaluation object. The method is not invoked if there is no body evaluation.

If doAfterBody returns EVAL_BODY_AGAIN, a new evaluation of the body will happen (followed by another invocation of doAfterBody). If doAfterBody returns SKIP_BODY, no more body evaluations will occur, and the doEndTag method will be invoked.

If this tag handler implements BodyTag and doAfterBody returns SKIP_BODY, the value of out will be restored using the popBody method in pageContext prior to invoking doEndTag.

The method re-invocations may be lead to different actions because there might have been some changes to shared state, or because of external computation.

The JSP container will resynchronize the values of any AT_BEGIN and NESTED variables (defined by the associated TagExtraInfo or TLD) after the invocation of doAfterBody().

Returns:
whether additional evaluations of the body are desired
Throws:
JspException - if an error occurred while processing this tag
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JspContext (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp
Class JspContext

java.lang.Object
    extended by javax.servlet.jsp.JspContext
Direct Known Subclasses:
PageContext
public abstract class JspContext
extends java.lang.Object

JspContext serves as the base class for the PageContext class and abstracts all information that is not specific to servlets. This allows for Simple Tag Extensions to be used outside of the context of a request/response Servlet.

The JspContext provides a number of facilities to the page/component author and page implementor, including:

  • a single API to manage the various scoped namespaces
  • a mechanism to obtain the JspWriter for output
  • a mechanism to expose page directive attributes to the scripting environment

Methods Intended for Container Generated Code

The following methods enable the management of nested JspWriter streams to implement Tag Extensions: pushBody() and popBody()

Methods Intended for JSP authors

Some methods provide uniform access to the diverse objects representing scopes. The implementation must use the underlying machinery corresponding to that scope, so information can be passed back and forth between the underlying environment (e.g. Servlets) and JSP pages. The methods are: setAttribute(), getAttribute(), findAttribute(), removeAttribute(), getAttributesScope() and getAttributeNamesInScope().

The following methods provide convenient access to implicit objects: getOut()

The following methods provide programmatic access to the Expression Language evaluator: getExpressionEvaluator(), getVariableResolver()

Since:
2.0

Constructor Summary
JspContext()
Sole constructor.
Method Summary
abstract  java.lang.Object findAttribute(java.lang.String name)
Searches for the named attribute in page, request, session (if valid), and application scope(s) in order and returns the value associated or null.
abstract  java.lang.Object getAttribute(java.lang.String name)
Returns the object associated with the name in the page scope or null if not found.
abstract  java.lang.Object getAttribute(java.lang.String name, int scope)
Return the object associated with the name in the specified scope or null if not found.
abstract  java.util.Enumeration getAttributeNamesInScope(int scope)
Enumerate all the attributes in a given scope.
abstract  int getAttributesScope(java.lang.String name)
Get the scope where a given attribute is defined.
abstract  ExpressionEvaluator getExpressionEvaluator()
Provides programmatic access to the ExpressionEvaluator.
abstract  JspWriter getOut()
The current value of the out object (a JspWriter).
abstract  VariableResolver getVariableResolver()
Returns an instance of a VariableResolver that provides access to the implicit objects specified in the JSP specification using this JspContext as the context object.
 JspWriter popBody()
Return the previous JspWriter "out" saved by the matching pushBody(), and update the value of the "out" attribute in the page scope attribute namespace of the JspContext.
 JspWriter pushBody(java.io.Writer writer)
Return a new JspWriter object that sends output to the provided Writer.
abstract  void removeAttribute(java.lang.String name)
Remove the object reference associated with the given name from all scopes.
abstract  void removeAttribute(java.lang.String name, int scope)
Remove the object reference associated with the specified name in the given scope.
abstract  void setAttribute(java.lang.String name, java.lang.Object value)
Register the name and value specified with page scope semantics.
abstract  void setAttribute(java.lang.String name, java.lang.Object value, int scope)
Register the name and value specified with appropriate scope semantics.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JspContext

public JspContext()
Sole constructor. (For invocation by subclass constructors, typically implicit.)

Method Detail

setAttribute

public abstract void setAttribute(java.lang.String name,
                                  java.lang.Object value)
Register the name and value specified with page scope semantics. If the value passed in is null, this has the same effect as calling removeAttribute( name, PageContext.PAGE_SCOPE ).

Parameters:
name - the name of the attribute to set
value - the value to associate with the name, or null if the attribute is to be removed from the page scope.
Throws:
java.lang.NullPointerException - if the name is null

setAttribute

public abstract void setAttribute(java.lang.String name,
                                  java.lang.Object value,
                                  int scope)
Register the name and value specified with appropriate scope semantics. If the value passed in is null, this has the same effect as calling removeAttribute( name, scope ).

Parameters:
name - the name of the attribute to set
value - the object to associate with the name, or null if the attribute is to be removed from the specified scope.
scope - the scope with which to associate the name/object
Throws:
java.lang.NullPointerException - if the name is null
java.lang.IllegalArgumentException - if the scope is invalid
java.lang.IllegalStateException - if the scope is PageContext.SESSION_SCOPE but the page that was requested does not participate in a session or the session has been invalidated.

getAttribute

public abstract java.lang.Object getAttribute(java.lang.String name)
Returns the object associated with the name in the page scope or null if not found.

Parameters:
name - the name of the attribute to get
Returns:
the object associated with the name in the page scope or null if not found.
Throws:
java.lang.NullPointerException - if the name is null

getAttribute

public abstract java.lang.Object getAttribute(java.lang.String name,
                                              int scope)
Return the object associated with the name in the specified scope or null if not found.

Parameters:
name - the name of the attribute to set
scope - the scope with which to associate the name/object
Returns:
the object associated with the name in the specified scope or null if not found.
Throws:
java.lang.NullPointerException - if the name is null
java.lang.IllegalArgumentException - if the scope is invalid
java.lang.IllegalStateException - if the scope is PageContext.SESSION_SCOPE but the page that was requested does not participate in a session or the session has been invalidated.

findAttribute

public abstract java.lang.Object findAttribute(java.lang.String name)
Searches for the named attribute in page, request, session (if valid), and application scope(s) in order and returns the value associated or null.

Parameters:
name - the name of the attribute to search for
Returns:
the value associated or null
Throws:
java.lang.NullPointerException - if the name is null

removeAttribute

public abstract void removeAttribute(java.lang.String name)
Remove the object reference associated with the given name from all scopes. Does nothing if there is no such object.

Parameters:
name - The name of the object to remove.
Throws:
java.lang.NullPointerException - if the name is null

removeAttribute

public abstract void removeAttribute(java.lang.String name,
                                     int scope)
Remove the object reference associated with the specified name in the given scope. Does nothing if there is no such object.

Parameters:
name - The name of the object to remove.
scope - The scope where to look.
Throws:
java.lang.IllegalArgumentException - if the scope is invalid
java.lang.IllegalStateException - if the scope is PageContext.SESSION_SCOPE but the page that was requested does not participate in a session or the session has been invalidated.
java.lang.NullPointerException - if the name is null

getAttributesScope

public abstract int getAttributesScope(java.lang.String name)
Get the scope where a given attribute is defined.

Parameters:
name - the name of the attribute to return the scope for
Returns:
the scope of the object associated with the name specified or 0
Throws:
java.lang.NullPointerException - if the name is null

getAttributeNamesInScope

public abstract java.util.Enumeration getAttributeNamesInScope(int scope)
Enumerate all the attributes in a given scope.

Parameters:
scope - the scope to enumerate all the attributes for
Returns:
an enumeration of names (java.lang.String) of all the attributes the specified scope
Throws:
java.lang.IllegalArgumentException - if the scope is invalid
java.lang.IllegalStateException - if the scope is PageContext.SESSION_SCOPE but the page that was requested does not participate in a session or the session has been invalidated.

getOut

public abstract JspWriter getOut()
The current value of the out object (a JspWriter).

Returns:
the current JspWriter stream being used for client response

getExpressionEvaluator

public abstract ExpressionEvaluator getExpressionEvaluator()
Provides programmatic access to the ExpressionEvaluator. The JSP Container must return a valid instance of an ExpressionEvaluator that can parse EL expressions.

Returns:
A valid instance of an ExpressionEvaluator.
Since:
2.0

getVariableResolver

public abstract VariableResolver getVariableResolver()
Returns an instance of a VariableResolver that provides access to the implicit objects specified in the JSP specification using this JspContext as the context object.

Returns:
A valid instance of a VariableResolver.
Since:
2.0

pushBody

public JspWriter pushBody(java.io.Writer writer)
Return a new JspWriter object that sends output to the provided Writer. Saves the current "out" JspWriter, and updates the value of the "out" attribute in the page scope attribute namespace of the JspContext.

The returned JspWriter must implement all methods and behave as though it were unbuffered. More specifically:

  • clear() must throw an IOException
  • clearBuffer() does nothing
  • getBufferSize() always returns 0
  • getRemaining() always returns 0

Parameters:
writer - The Writer for the returned JspWriter to send output to.
Returns:
a new JspWriter that writes to the given Writer.
Since:
2.0

popBody

public JspWriter popBody()
Return the previous JspWriter "out" saved by the matching pushBody(), and update the value of the "out" attribute in the page scope attribute namespace of the JspContext.

Returns:
the saved JspWriter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JspEngineInfo (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp
Class JspEngineInfo

java.lang.Object
    extended by javax.servlet.jsp.JspEngineInfo
public abstract class JspEngineInfo
extends java.lang.Object

The JspEngineInfo is an abstract class that provides information on the current JSP engine.

Constructor Summary
JspEngineInfo()
Sole constructor.
Method Summary
abstract  java.lang.String getSpecificationVersion()
Return the version number of the JSP specification that is supported by this JSP engine.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JspEngineInfo

public JspEngineInfo()
Sole constructor. (For invocation by subclass constructors, typically implicit.)

Method Detail

getSpecificationVersion

public abstract java.lang.String getSpecificationVersion()
Return the version number of the JSP specification that is supported by this JSP engine.

Specification version numbers that consists of positive decimal integers separated by periods ".", for example, "2.0" or "1.2.3.4.5.6.7". This allows an extensible number to be used to represent major, minor, micro, etc versions. The version number must begin with a number.

Returns:
the specification version, null is returned if it is not known
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JspException (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp
Class JspException

java.lang.Object
    extended by java.lang.Throwable
        extended by java.lang.Exception
            extended by javax.servlet.jsp.JspException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
JspTagException, SkipPageException
public class JspException
extends java.lang.Exception

A generic exception known to the JSP engine; uncaught JspExceptions will result in an invocation of the errorpage machinery.

See Also:
Serialized Form

Constructor Summary
JspException()
Construct a JspException.
JspException(java.lang.String msg)
Constructs a new JSP exception with the specified message.
JspException(java.lang.String message, java.lang.Throwable rootCause)
Constructs a new JSP exception when the JSP needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation, including a description message.
JspException(java.lang.Throwable rootCause)
Constructs a new JSP exception when the JSP needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation.
Method Summary
 java.lang.Throwable getRootCause()
Returns the exception that caused this JSP exception.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JspException

public JspException()
Construct a JspException.

JspException

public JspException(java.lang.String msg)
Constructs a new JSP exception with the specified message. The message can be written to the server log and/or displayed for the user.

Parameters:
msg - a String specifying the text of the exception message

JspException

public JspException(java.lang.String message,
                    java.lang.Throwable rootCause)
Constructs a new JSP exception when the JSP needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation, including a description message.

Parameters:
message - a String containing the text of the exception message
rootCause - the Throwable exception that interfered with the servlet's normal operation, making this servlet exception necessary

JspException

public JspException(java.lang.Throwable rootCause)
Constructs a new JSP exception when the JSP needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation. The exception's message is based on the localized message of the underlying exception.

This method calls the getLocalizedMessage method on the Throwable exception to get a localized exception message. When subclassing JspException, this method can be overridden to create an exception message designed for a specific locale.

Parameters:
rootCause - the Throwable exception that interfered with the JSP's normal operation, making the JSP exception necessary
Method Detail

getRootCause

public java.lang.Throwable getRootCause()
Returns the exception that caused this JSP exception.

Returns:
the Throwable that caused this JSP exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


JspFactory (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp
Class JspFactory

java.lang.Object
    extended by javax.servlet.jsp.JspFactory
public abstract class JspFactory
extends java.lang.Object

The JspFactory is an abstract class that defines a number of factory methods available to a JSP page at runtime for the purposes of creating instances of various interfaces and classes used to support the JSP implementation.

A conformant JSP Engine implementation will, during it's initialization instantiate an implementation dependent subclass of this class, and make it globally available for use by JSP implementation classes by registering the instance created with this class via the static setDefaultFactory() method.

The PageContext and the JspEngineInfo classes are the only implementation-dependent classes that can be created from the factory.

JspFactory objects should not be used by JSP page authors.

Constructor Summary
JspFactory()
Sole constructor.
Method Summary
static JspFactory | getDefaultFactory() Returns the default factory for this implementation.
abstract JspEngineInfo | getEngineInfo() called to get implementation-specific information on the current JSP engine.
abstract PageContext | getPageContext(javax.servlet.Servlet servlet, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, java.lang.String errorPageURL, boolean needsSession, int buffer, boolean autoflush) obtains an instance of an implementation dependent javax.servlet.jsp.PageContext abstract class for the calling Servlet and currently pending request and response.
abstract void | releasePageContext(PageContext pc) called to release a previously allocated PageContext object.
static void | setDefaultFactory(JspFactory deflt) set the default factory for this implementation.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JspFactory

public JspFactory()
Sole constructor. (For invocation by subclass constructors, typically implicit.)

Method Detail

setDefaultFactory

public static void setDefaultFactory(JspFactory deflt)

set the default factory for this implementation. It is illegal for any principal other than the JSP Engine runtime to call this method.

Parameters:
deflt - The default factory implementation

getDefaultFactory

public static JspFactory getDefaultFactory()
Returns the default factory for this implementation.

Returns:
the default factory for this implementation

getPageContext

public abstract PageContext getPageContext(javax.servlet.Servlet servlet,
                                           javax.servlet.ServletRequest request,
                                           javax.servlet.ServletResponse response,
                                           java.lang.String errorPageURL,
                                           boolean needsSession,
                                           int buffer,
                                           boolean autoflush)

obtains an instance of an implementation dependent javax.servlet.jsp.PageContext abstract class for the calling Servlet and currently pending request and response.

This method is typically called early in the processing of the _jspService() method of a JSP implementation class in order to obtain a PageContext object for the request being processed.

Invoking this method shall result in the PageContext.initialize() method being invoked. The PageContext returned is properly initialized.

All PageContext objects obtained via this method shall be released by invoking releasePageContext().

Parameters:
servlet - the requesting servlet
request - the current request pending on the servlet
response - the current response pending on the servlet
errorPageURL - the URL of the error page for the requesting JSP, or null
needsSession - true if the JSP participates in a session
buffer - size of buffer in bytes, PageContext.NO_BUFFER if no buffer, PageContext.DEFAULT_BUFFER if implementation default.
autoflush - should the buffer autoflush to the output stream on buffer overflow, or throw an IOException?
Returns:
the page context
See Also:
PageContext

releasePageContext

public abstract void releasePageContext(PageContext pc)

called to release a previously allocated PageContext object. Results in PageContext.release() being invoked. This method should be invoked prior to returning from the _jspService() method of a JSP implementation class.

Parameters:
pc - A PageContext previously obtained by getPageContext()

getEngineInfo

public abstract JspEngineInfo getEngineInfo()

called to get implementation-specific information on the current JSP engine.

Returns:
a JspEngineInfo object describing the current JSP engine
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JspFragment (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class JspFragment

java.lang.Object
    extended by javax.servlet.jsp.tagext.JspFragment
public abstract class JspFragment
extends java.lang.Object

Encapsulates a portion of JSP code in an object that can be invoked as many times as needed. JSP Fragments are defined using JSP syntax as the body of a tag for an invocation to a SimpleTag handler, or as the body of a <jsp:attribute> standard action specifying the value of an attribute that is declared as a fragment, or to be of type JspFragment in the TLD.

The definition of the JSP fragment must only contain template text and JSP action elements. In other words, it must not contain scriptlets or scriptlet expressions. At translation time, the container generates an implementation of the JspFragment abstract class capable of executing the defined fragment.

A tag handler can invoke the fragment zero or more times, or pass it along to other tags, before returning. To communicate values to/from a JSP fragment, tag handlers store/retrieve values in the JspContext associated with the fragment.

Note that tag library developers and page authors should not generate JspFragment implementations manually.

Implementation Note: It is not necessary to generate a separate class for each fragment. One possible implementation is to generate a single helper class for each page that implements JspFragment. Upon construction, a discriminator can be passed to select which fragment that instance will execute.

Since:
2.0

Constructor Summary
JspFragment()
Method Summary
abstract  JspContext getJspContext()
Returns the JspContext that is bound to this JspFragment.
abstract  void invoke(java.io.Writer out)
Executes the fragment and directs all output to the given Writer, or the JspWriter returned by the getOut() method of the JspContext associated with the fragment if out is null.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JspFragment

public JspFragment()
Method Detail

invoke

public abstract void invoke(java.io.Writer out)
                     throws JspException,
                            java.io.IOException
Executes the fragment and directs all output to the given Writer, or the JspWriter returned by the getOut() method of the JspContext associated with the fragment if out is null.

Parameters:
out - The Writer to output the fragment to, or null if output should be sent to JspContext.getOut().
Throws:
JspException - Thrown if an error occured while invoking this fragment.
SkipPageException - Thrown if the page that (either directly or indirectly) invoked the tag handler that invoked this fragment is to cease evaluation. The container must throw this exception if a Classic Tag Handler returned Tag.SKIP_PAGE or if a Simple Tag Handler threw SkipPageException.
java.io.IOException - If there was an error writing to the stream.

getJspContext

public abstract JspContext getJspContext()
Returns the JspContext that is bound to this JspFragment.

Returns:
The JspContext used by this fragment at invocation time.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JspPage (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp
Interface JspPage

All Superinterfaces:
javax.servlet.Servlet
All Known Subinterfaces:
HttpJspPage
public interface JspPage
extends javax.servlet.Servlet

The JspPage interface describes the generic interaction that a JSP Page Implementation class must satisfy; pages that use the HTTP protocol are described by the HttpJspPage interface.

Two plus One Methods

The interface defines a protocol with 3 methods; only two of them: jspInit() and jspDestroy() are part of this interface as the signature of the third method: _jspService() depends on the specific protocol used and cannot be expressed in a generic way in Java.

A class implementing this interface is responsible for invoking the above methods at the appropriate time based on the corresponding Servlet-based method invocations.

The jspInit() and jspDestroy() methods can be defined by a JSP author, but the _jspService() method is defined automatically by the JSP processor based on the contents of the JSP page.

_jspService()

The _jspService()method corresponds to the body of the JSP page. This method is defined automatically by the JSP container and should never be defined by the JSP page author.

If a superclass is specified using the extends attribute, that superclass may choose to perform some actions in its service() method before or after calling the _jspService() method. See using the extends attribute in the JSP_Engine chapter of the JSP specification.

The specific signature depends on the protocol supported by the JSP page.

 public void _jspService(ServletRequestSubtype request,
                             ServletResponseSubtype response)
        throws ServletException, IOException;

Method Summary
 void jspDestroy()
The jspDestroy() method is invoked when the JSP page is about to be destroyed.
 void jspInit()
The jspInit() method is invoked when the JSP page is initialized.
Methods inherited from interface javax.servlet.Servlet
destroy, getServletConfig, getServletInfo, init, service

Method Detail

jspInit

public void jspInit()
The jspInit() method is invoked when the JSP page is initialized. It is the responsibility of the JSP implementation (and of the class mentioned by the extends attribute, if present) that at this point invocations to the getServletConfig() method will return the desired value. A JSP page can override this method by including a definition for it in a declaration element. A JSP page should redefine the init() method from Servlet.

jspDestroy

public void jspDestroy()
The jspDestroy() method is invoked when the JSP page is about to be destroyed. A JSP page can override this method by including a definition for it in a declaration element. A JSP page should redefine the destroy() method from Servlet.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


JspTag (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Interface JspTag

All Known Subinterfaces:
BodyTag, IterationTag, SimpleTag, Tag
All Known Implementing Classes:
BodyTagSupport, SimpleTagSupport, TagAdapter, TagSupport
public interface JspTag

Serves as a base class for Tag and SimpleTag. This is mostly for organizational and type-safety purposes.

Since:
2.0

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JspTagException (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp
Class JspTagException

java.lang.Object
    extended by java.lang.Throwable
        extended by java.lang.Exception
            extended by javax.servlet.jsp.JspException
                extended by javax.servlet.jsp.JspTagException
All Implemented Interfaces:
java.io.Serializable
public class JspTagException
extends JspException

Exception to be used by a Tag Handler to indicate some unrecoverable error. This error is to be caught by the top level of the JSP page and will result in an error page.

See Also:
Serialized Form

Constructor Summary
JspTagException()
Constructs a new JspTagException with no message.
JspTagException(java.lang.String msg)
Constructs a new JspTagException with the specified message.
JspTagException(java.lang.String message, java.lang.Throwable rootCause)
Constructs a new JspTagException when the JSP Tag needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation, including a description message.
JspTagException(java.lang.Throwable rootCause)
Constructs a new JSP Tag exception when the JSP Tag needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation.
Methods inherited from class javax.servlet.jsp.JspException
getRootCause
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

JspTagException

public JspTagException(java.lang.String msg)
Constructs a new JspTagException with the specified message. The message can be written to the server log and/or displayed for the user.

Parameters:
msg - a String specifying the text of the exception message

JspTagException

public JspTagException()
Constructs a new JspTagException with no message.

JspTagException

public JspTagException(java.lang.String message,
                       java.lang.Throwable rootCause)
Constructs a new JspTagException when the JSP Tag needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation, including a description message.

Parameters:
message - a String containing the text of the exception message
rootCause - the Throwable exception that interfered with the JSP Tag's normal operation, making this JSP Tag exception necessary
Since:
2.0

JspTagException

public JspTagException(java.lang.Throwable rootCause)
Constructs a new JSP Tag exception when the JSP Tag needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation. The exception's message is based on the localized message of the underlying exception.

This method calls the getLocalizedMessage method on the Throwable exception to get a localized exception message. When subclassing JspTagException, this method can be overridden to create an exception message designed for a specific locale.

Parameters:
rootCause - the Throwable exception that interfered with the JSP Tag's normal operation, making the JSP Tag exception necessary
Since:
2.0
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JspWriter (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp
Class JspWriter

java.lang.Object
    extended by java.io.Writer
        extended by javax.servlet.jsp.JspWriter
Direct Known Subclasses:
BodyContent
public abstract class JspWriter
extends java.io.Writer

The actions and template data in a JSP page is written using the JspWriter object that is referenced by the implicit variable out which is initialized automatically using methods in the PageContext object.

This abstract class emulates some of the functionality found in the java.io.BufferedWriter and java.io.PrintWriter classes, however it differs in that it throws java.io.IOException from the print methods while PrintWriter does not.

Buffering

The initial JspWriter object is associated with the PrintWriter object of the ServletResponse in a way that depends on whether the page is or is not buffered. If the page is not buffered, output written to this JspWriter object will be written through to the PrintWriter directly, which will be created if necessary by invoking the getWriter() method on the response object. But if the page is buffered, the PrintWriter object will not be created until the buffer is flushed and operations like setContentType() are legal. Since this flexibility simplifies programming substantially, buffering is the default for JSP pages.

Buffering raises the issue of what to do when the buffer is exceeded. Two approaches can be taken:

  • Exceeding the buffer is not a fatal error; when the buffer is exceeded, just flush the output.
  • Exceeding the buffer is a fatal error; when the buffer is exceeded, raise an exception.

Both approaches are valid, and thus both are supported in the JSP technology. The behavior of a page is controlled by the autoFlush attribute, which defaults to true. In general, JSP pages that need to be sure that correct and complete data has been sent to their client may want to set autoFlush to false, with a typical case being that where the client is an application itself. On the other hand, JSP pages that send data that is meaningful even when partially constructed may want to set autoFlush to true; such as when the data is sent for immediate display through a browser. Each application will need to consider their specific needs.

An alternative considered was to make the buffer size unbounded; but, this had the disadvantage that runaway computations would consume an unbounded amount of resources.

The "out" implicit variable of a JSP implementation class is of this type. If the page directive selects autoflush="true" then all the I/O operations on this class shall automatically flush the contents of the buffer if an overflow condition would result if the current operation were performed without a flush. If autoflush="false" then all the I/O operations on this class shall throw an IOException if performing the current operation would result in a buffer overflow condition.

See Also:
Writer, BufferedWriter, PrintWriter

Field Summary
protected boolean | autoFlush Whether the JspWriter is autoflushing.
protected int | bufferSize The size of the buffer used by the JspWriter.
static int | DEFAULT_BUFFER Constant indicating that the Writer is buffered and is using the implementation default buffer size.
static int | NO_BUFFER Constant indicating that the Writer is not buffering output.
static int | UNBOUNDED_BUFFER Constant indicating that the Writer is buffered and is unbounded; this is used in BodyContent.
Fields inherited from class java.io.Writer
lock
Constructor Summary
protected JspWriter(int bufferSize, boolean autoFlush)
Protected constructor.
Method Summary
abstract void | clear() Clear the contents of the buffer.
abstract void | clearBuffer() Clears the current contents of the buffer.
abstract void | close() Close the stream, flushing it first.
abstract void | flush() Flush the stream.
int | getBufferSize() This method returns the size of the buffer used by the JspWriter.
abstract int | getRemaining() This method returns the number of unused bytes in the buffer.
boolean | isAutoFlush() This method indicates whether the JspWriter is autoFlushing.
abstract void | newLine() Write a line separator.
abstract void | print(boolean b) Print a boolean value.
abstract void | print(char c) Print a character.
abstract void | print(char[] s) Print an array of characters.
abstract void | print(double d) Print a double-precision floating-point number.
abstract void | print(float f) Print a floating-point number.
abstract void | print(int i) Print an integer.
abstract void | print(long l) Print a long integer.
abstract void | print(java.lang.Object obj) Print an object.
abstract void | print(java.lang.String s) Print a string.
abstract void | println() Terminate the current line by writing the line separator string.
abstract void | println(boolean x) Print a boolean value and then terminate the line.
abstract void | println(char x) Print a character and then terminate the line.
abstract void | println(char[] x) Print an array of characters and then terminate the line.
abstract void | println(double x) Print a double-precision floating-point number and then terminate the line.
abstract void | println(float x) Print a floating-point number and then terminate the line.
abstract void | println(int x) Print an integer and then terminate the line.
abstract void | println(long x) Print a long integer and then terminate the line.
abstract void | println(java.lang.Object x) Print an Object and then terminate the line.
abstract void | println(java.lang.String x) Print a String and then terminate the line.
Methods inherited from class java.io.Writer
write, write, write, write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

NO_BUFFER

public static final int NO_BUFFER
Constant indicating that the Writer is not buffering output.

See Also:
Constant Field Values

DEFAULT_BUFFER

public static final int DEFAULT_BUFFER
Constant indicating that the Writer is buffered and is using the implementation default buffer size.

See Also:
Constant Field Values

UNBOUNDED_BUFFER

public static final int UNBOUNDED_BUFFER
Constant indicating that the Writer is buffered and is unbounded; this is used in BodyContent.

See Also:
Constant Field Values

bufferSize

protected int bufferSize
The size of the buffer used by the JspWriter.

autoFlush

protected boolean autoFlush
Whether the JspWriter is autoflushing.

Constructor Detail

JspWriter

protected JspWriter(int bufferSize,
                    boolean autoFlush)
Protected constructor.

Parameters:
bufferSize - the size of the buffer to be used by the JspWriter
autoFlush - whether the JspWriter should be autoflushing
Method Detail

newLine

public abstract void newLine()
                      throws java.io.IOException
Write a line separator. The line separator string is defined by the system property line.separator, and is not necessarily a single newline ('\n') character.

Throws:
java.io.IOException - If an I/O error occurs

print

public abstract void print(boolean b)
                    throws java.io.IOException
Print a boolean value. The string produced by String.valueOf(boolean) is written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer.

Parameters:
b - The boolean to be printed
Throws:
java.io.IOException - If an error occured while writing

print

public abstract void print(char c)
                    throws java.io.IOException
Print a character. The character is written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer.

Parameters:
c - The char to be printed
Throws:
java.io.IOException - If an error occured while writing

print

public abstract void print(int i)
                    throws java.io.IOException
Print an integer. The string produced by String.valueOf(int) is written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer.

Parameters:
i - The int to be printed
Throws:
java.io.IOException - If an error occured while writing
See Also:
Integer.toString(int)

print

public abstract void print(long l)
                    throws java.io.IOException
Print a long integer. The string produced by String.valueOf(long) is written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer.

Parameters:
l - The long to be printed
Throws:
java.io.IOException - If an error occured while writing
See Also:
Long.toString(long)

print

public abstract void print(float f)
                    throws java.io.IOException
Print a floating-point number. The string produced by String.valueOf(float) is written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer.

Parameters:
f - The float to be printed
Throws:
java.io.IOException - If an error occured while writing
See Also:
Float.toString(float)

print

public abstract void print(double d)
                    throws java.io.IOException
Print a double-precision floating-point number. The string produced by String.valueOf(double) is written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer.

Parameters:
d - The double to be printed
Throws:
java.io.IOException - If an error occured while writing
See Also:
Double.toString(double)

print

public abstract void print(char[] s)
                    throws java.io.IOException
Print an array of characters. The characters are written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer.

Parameters:
s - The array of chars to be printed
Throws:
java.lang.NullPointerException - If s is null
java.io.IOException - If an error occured while writing

print

public abstract void print(java.lang.String s)
                    throws java.io.IOException
Print a string. If the argument is null then the string "null" is printed. Otherwise, the string's characters are written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer.

Parameters:
s - The String to be printed
Throws:
java.io.IOException - If an error occured while writing

print

public abstract void print(java.lang.Object obj)
                    throws java.io.IOException
Print an object. The string produced by the String.valueOf(Object) method is written to the JspWriter's buffer or, if no buffer is used, directly to the underlying writer.

Parameters:
obj - The Object to be printed
Throws:
java.io.IOException - If an error occured while writing
See Also:
Object.toString()

println

public abstract void println()
                      throws java.io.IOException
Terminate the current line by writing the line separator string. The line separator string is defined by the system property line.separator, and is not necessarily a single newline character ('\n').

Throws:
java.io.IOException - If an error occured while writing

println

public abstract void println(boolean x)
                      throws java.io.IOException
Print a boolean value and then terminate the line. This method behaves as though it invokes print(boolean) and then println().

Parameters:
x - the boolean to write
Throws:
java.io.IOException - If an error occured while writing

println

public abstract void println(char x)
                      throws java.io.IOException
Print a character and then terminate the line. This method behaves as though it invokes print(char) and then println().

Parameters:
x - the char to write
Throws:
java.io.IOException - If an error occured while writing

println

public abstract void println(int x)
                      throws java.io.IOException
Print an integer and then terminate the line. This method behaves as though it invokes print(int) and then println().

Parameters:
x - the int to write
Throws:
java.io.IOException - If an error occured while writing

println

public abstract void println(long x)
                      throws java.io.IOException
Print a long integer and then terminate the line. This method behaves as though it invokes print(long) and then println().

Parameters:
x - the long to write
Throws:
java.io.IOException - If an error occured while writing

println

public abstract void println(float x)
                      throws java.io.IOException
Print a floating-point number and then terminate the line. This method behaves as though it invokes print(float) and then println().

Parameters:
x - the float to write
Throws:
java.io.IOException - If an error occured while writing

println

public abstract void println(double x)
                      throws java.io.IOException
Print a double-precision floating-point number and then terminate the line. This method behaves as though it invokes print(double) and then println().

Parameters:
x - the double to write
Throws:
java.io.IOException - If an error occured while writing

println

public abstract void println(char[] x)
                      throws java.io.IOException
Print an array of characters and then terminate the line. This method behaves as though it invokes print(char[]) and then println().

Parameters:
x - the char[] to write
Throws:
java.io.IOException - If an error occured while writing

println

public abstract void println(java.lang.String x)
                      throws java.io.IOException
Print a String and then terminate the line. This method behaves as though it invokes print(String) and then println().

Parameters:
x - the String to write
Throws:
java.io.IOException - If an error occured while writing

println

public abstract void println(java.lang.Object x)
                      throws java.io.IOException
Print an Object and then terminate the line. This method behaves as though it invokes print(Object) and then println().

Parameters:
x - the Object to write
Throws:
java.io.IOException - If an error occured while writing

clear

public abstract void clear()
                    throws java.io.IOException
Clear the contents of the buffer. If the buffer has been already been flushed then the clear operation shall throw an IOException to signal the fact that some data has already been irrevocably written to the client response stream.

Throws:
java.io.IOException - If an I/O error occurs

clearBuffer

public abstract void clearBuffer()
                          throws java.io.IOException
Clears the current contents of the buffer. Unlike clear(), this method will not throw an IOException if the buffer has already been flushed. It merely clears the current content of the buffer and returns.

Throws:
java.io.IOException - If an I/O error occurs

flush

public abstract void flush()
                    throws java.io.IOException
Flush the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams.

The method may be invoked indirectly if the buffer size is exceeded.

Once a stream has been closed, further write() or flush() invocations will cause an IOException to be thrown.

Throws:
java.io.IOException - If an I/O error occurs

close

public abstract void close()
                    throws java.io.IOException
Close the stream, flushing it first.

This method needs not be invoked explicitly for the initial JspWriter as the code generated by the JSP container will automatically include a call to close().

Closing a previously-closed stream, unlike flush(), has no effect.

Throws:
java.io.IOException - If an I/O error occurs

getBufferSize

public int getBufferSize()
This method returns the size of the buffer used by the JspWriter.

Returns:
the size of the buffer in bytes, or 0 is unbuffered.

getRemaining

public abstract int getRemaining()
This method returns the number of unused bytes in the buffer.

Returns:
the number of bytes unused in the buffer

isAutoFlush

public boolean isAutoFlush()
This method indicates whether the JspWriter is autoFlushing.

Returns:
if this JspWriter is auto flushing or throwing IOExceptions on buffer overflow conditions
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PageContext (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp
Class PageContext

java.lang.Object
    extended by javax.servlet.jsp.JspContext
        extended by javax.servlet.jsp.PageContext
public abstract class PageContext
extends JspContext

PageContext extends JspContext to provide useful context information for when JSP technology is used in a Servlet environment.

A PageContext instance provides access to all the namespaces associated with a JSP page, provides access to several page attributes, as well as a layer above the implementation details. Implicit objects are added to the pageContext automatically.

The PageContext class is an abstract class, designed to be extended to provide implementation dependent implementations thereof, by conformant JSP engine runtime environments. A PageContext instance is obtained by a JSP implementation class by calling the JspFactory.getPageContext() method, and is released by calling JspFactory.releasePageContext().

An example of how PageContext, JspFactory, and other classes can be used within a JSP Page Implementation object is given elsewhere.

The PageContext provides a number of facilities to the page/component author and page implementor, including:

  • a single API to manage the various scoped namespaces
  • a number of convenience API's to access various public objects
  • a mechanism to obtain the JspWriter for output
  • a mechanism to manage session usage by the page
  • a mechanism to expose page directive attributes to the scripting environment
  • mechanisms to forward or include the current request to other active components in the application
  • a mechanism to handle errorpage exception processing

Methods Intended for Container Generated Code

Some methods are intended to be used by the code generated by the container, not by code written by JSP page authors, or JSP tag library authors.

The methods supporting lifecycle are initialize() and release()

The following methods enable the management of nested JspWriter streams to implement Tag Extensions: pushBody()

Methods Intended for JSP authors

The following methods provide convenient access to implicit objects:
getException(),  getPage()
getRequest(),  getResponse(),
getSession(),  getServletConfig()
and getServletContext().

The following methods provide support for forwarding, inclusion and error handling: forward(), include(), and handlePageException().

Field Summary
static java.lang.String | APPLICATION Name used to store ServletContext in PageContext name table.
static int | APPLICATION_SCOPE Application scope: named reference remains available in the ServletContext until it is reclaimed.
static java.lang.String | CONFIG Name used to store ServletConfig in PageContext name table.
static java.lang.String | EXCEPTION Name used to store uncaught exception in ServletRequest attribute list and PageContext name table.
static java.lang.String | OUT Name used to store current JspWriter in PageContext name table.
static java.lang.String | PAGE Name used to store the Servlet in this PageContext's nametables.
static int | PAGE_SCOPE Page scope: (this is the default) the named reference remains available in this PageContext until the return from the current Servlet.service() invocation.
static java.lang.String | PAGECONTEXT Name used to store this PageContext in it's own name table.
static java.lang.String | REQUEST Name used to store ServletRequest in PageContext name table.
static int | REQUEST_SCOPE Request scope: the named reference remains available from the ServletRequest associated with the Servlet until the current request is completed.
static java.lang.String | RESPONSE Name used to store ServletResponse in PageContext name table.
static java.lang.String | SESSION Name used to store HttpSession in PageContext name table.
static int | SESSION_SCOPE Session scope (only valid if this page participates in a session): the named reference remains available from the HttpSession (if any) associated with the Servlet until the HttpSession is invalidated.
Constructor Summary
PageContext()
Sole constructor.
Method Summary
abstract  void forward(java.lang.String relativeUrlPath)
This method is used to re-direct, or "forward" the current ServletRequest and ServletResponse to another active component in the application.
 ErrorData getErrorData()
Provides convenient access to error information.
abstract  java.lang.Exception getException()
The current value of the exception object (an Exception).
abstract  java.lang.Object getPage()
The current value of the page object (In a Servlet environment, this is an instance of javax.servlet.Servlet).
abstract  javax.servlet.ServletRequest getRequest()
The current value of the request object (a ServletRequest).
abstract  javax.servlet.ServletResponse getResponse()
The current value of the response object (a ServletResponse).
abstract  javax.servlet.ServletConfig getServletConfig()
The ServletConfig instance.
abstract  javax.servlet.ServletContext getServletContext()
The ServletContext instance.
abstract  javax.servlet.http.HttpSession getSession()
The current value of the session object (an HttpSession).
abstract  void handlePageException(java.lang.Exception e)
This method is intended to process an unhandled 'page' level exception by forwarding the exception to the specified error page for this JSP.
abstract  void handlePageException(java.lang.Throwable t)
This method is intended to process an unhandled 'page' level exception by forwarding the exception to the specified error page for this JSP.
abstract  void include(java.lang.String relativeUrlPath)
Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread.
abstract  void include(java.lang.String relativeUrlPath, boolean flush)
Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread.
abstract  void initialize(javax.servlet.Servlet servlet, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, java.lang.String errorPageURL, boolean needsSession, int bufferSize, boolean autoFlush)
The initialize method is called to initialize an uninitialized PageContext so that it may be used by a JSP Implementation class to service an incoming request and response within it's _jspService() method.
 BodyContent pushBody()
Return a new BodyContent object, save the current "out" JspWriter, and update the value of the "out" attribute in the page scope attribute namespace of the PageContext.
abstract  void release()
This method shall "reset" the internal state of a PageContext, releasing all internal references, and preparing the PageContext for potential reuse by a later invocation of initialize().
Methods inherited from class javax.servlet.jsp.JspContext
findAttribute, getAttribute, getAttribute, getAttributeNamesInScope, getAttributesScope, getExpressionEvaluator, getOut, getVariableResolver, popBody, pushBody, removeAttribute, removeAttribute, setAttribute, setAttribute
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

PAGE_SCOPE

public static final int PAGE_SCOPE
Page scope: (this is the default) the named reference remains available in this PageContext until the return from the current Servlet.service() invocation.

See Also:
Constant Field Values

REQUEST_SCOPE

public static final int REQUEST_SCOPE
Request scope: the named reference remains available from the ServletRequest associated with the Servlet until the current request is completed.

See Also:
Constant Field Values

SESSION_SCOPE

public static final int SESSION_SCOPE
Session scope (only valid if this page participates in a session): the named reference remains available from the HttpSession (if any) associated with the Servlet until the HttpSession is invalidated.

See Also:
Constant Field Values

APPLICATION_SCOPE

public static final int APPLICATION_SCOPE
Application scope: named reference remains available in the ServletContext until it is reclaimed.

See Also:
Constant Field Values

PAGE

public static final java.lang.String PAGE
Name used to store the Servlet in this PageContext's nametables.

See Also:
Constant Field Values

PAGECONTEXT

public static final java.lang.String PAGECONTEXT
Name used to store this PageContext in it's own name table.

See Also:
Constant Field Values

REQUEST

public static final java.lang.String REQUEST
Name used to store ServletRequest in PageContext name table.

See Also:
Constant Field Values

RESPONSE

public static final java.lang.String RESPONSE
Name used to store ServletResponse in PageContext name table.

See Also:
Constant Field Values

CONFIG

public static final java.lang.String CONFIG
Name used to store ServletConfig in PageContext name table.

See Also:
Constant Field Values

SESSION

public static final java.lang.String SESSION
Name used to store HttpSession in PageContext name table.

See Also:
Constant Field Values

OUT

public static final java.lang.String OUT
Name used to store current JspWriter in PageContext name table.

See Also:
Constant Field Values

APPLICATION

public static final java.lang.String APPLICATION
Name used to store ServletContext in PageContext name table.

See Also:
Constant Field Values

EXCEPTION

public static final java.lang.String EXCEPTION
Name used to store uncaught exception in ServletRequest attribute list and PageContext name table.

See Also:
Constant Field Values
Constructor Detail

PageContext

public PageContext()
Sole constructor. (For invocation by subclass constructors, typically implicit.)

Method Detail

initialize

public abstract void initialize(javax.servlet.Servlet servlet,
                                javax.servlet.ServletRequest request,
                                javax.servlet.ServletResponse response,
                                java.lang.String errorPageURL,
                                boolean needsSession,
                                int bufferSize,
                                boolean autoFlush)
                         throws java.io.IOException,
                                java.lang.IllegalStateException,
                                java.lang.IllegalArgumentException

The initialize method is called to initialize an uninitialized PageContext so that it may be used by a JSP Implementation class to service an incoming request and response within it's _jspService() method.

This method is typically called from JspFactory.getPageContext() in order to initialize state.

This method is required to create an initial JspWriter, and associate the "out" name in page scope with this newly created object.

This method should not be used by page or tag library authors.

Parameters:
servlet - The Servlet that is associated with this PageContext
request - The currently pending request for this Servlet
response - The currently pending response for this Servlet
errorPageURL - The value of the errorpage attribute from the page directive or null
needsSession - The value of the session attribute from the page directive
bufferSize - The value of the buffer attribute from the page directive
autoFlush - The value of the autoflush attribute from the page directive
Throws:
java.io.IOException - during creation of JspWriter
java.lang.IllegalStateException - if out not correctly initialized
java.lang.IllegalArgumentException - If one of the given parameters is invalid

release

public abstract void release()

This method shall "reset" the internal state of a PageContext, releasing all internal references, and preparing the PageContext for potential reuse by a later invocation of initialize(). This method is typically called from JspFactory.releasePageContext().

Subclasses shall envelope this method.

This method should not be used by page or tag library authors.

getSession

public abstract javax.servlet.http.HttpSession getSession()
The current value of the session object (an HttpSession).

Returns:
the HttpSession for this PageContext or null

getPage

public abstract java.lang.Object getPage()
The current value of the page object (In a Servlet environment, this is an instance of javax.servlet.Servlet).

Returns:
the Page implementation class instance associated with this PageContext

getRequest

public abstract javax.servlet.ServletRequest getRequest()
The current value of the request object (a ServletRequest).

Returns:
The ServletRequest for this PageContext

getResponse

public abstract javax.servlet.ServletResponse getResponse()
The current value of the response object (a ServletResponse).

Returns:
the ServletResponse for this PageContext

getException

public abstract java.lang.Exception getException()
The current value of the exception object (an Exception).

Returns:
any exception passed to this as an errorpage

getServletConfig

public abstract javax.servlet.ServletConfig getServletConfig()
The ServletConfig instance.

Returns:
the ServletConfig for this PageContext

getServletContext

public abstract javax.servlet.ServletContext getServletContext()
The ServletContext instance.

Returns:
the ServletContext for this PageContext

forward

public abstract void forward(java.lang.String relativeUrlPath)
                      throws javax.servlet.ServletException,
                             java.io.IOException

This method is used to re-direct, or "forward" the current ServletRequest and ServletResponse to another active component in the application.

If the relativeUrlPath begins with a "/" then the URL specified is calculated relative to the DOCROOT of the ServletContext for this JSP. If the path does not begin with a "/" then the URL specified is calculated relative to the URL of the request that was mapped to the calling JSP.

It is only valid to call this method from a Thread executing within a _jspService(...) method of a JSP.

Once this method has been called successfully, it is illegal for the calling Thread to attempt to modify the ServletResponse object. Any such attempt to do so, shall result in undefined behavior. Typically, callers immediately return from _jspService(...) after calling this method.

Parameters:
relativeUrlPath - specifies the relative URL path to the target resource as described above
Throws:
java.lang.IllegalStateException - if ServletResponse is not in a state where a forward can be performed
javax.servlet.ServletException - if the page that was forwarded to throws a ServletException
java.io.IOException - if an I/O error occurred while forwarding

include

public abstract void include(java.lang.String relativeUrlPath)
                      throws javax.servlet.ServletException,
                             java.io.IOException

Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread. The output of the target resources processing of the request is written directly to the ServletResponse output stream.

The current JspWriter "out" for this JSP is flushed as a side-effect of this call, prior to processing the include.

If the relativeUrlPath begins with a "/" then the URL specified is calculated relative to the DOCROOT of the ServletContext for this JSP. If the path does not begin with a "/" then the URL specified is calculated relative to the URL of the request that was mapped to the calling JSP.

It is only valid to call this method from a Thread executing within a _jspService(...) method of a JSP.

Parameters:
relativeUrlPath - specifies the relative URL path to the target resource to be included
Throws:
javax.servlet.ServletException - if the page that was forwarded to throws a ServletException
java.io.IOException - if an I/O error occurred while forwarding

include

public abstract void include(java.lang.String relativeUrlPath,
                             boolean flush)
                      throws javax.servlet.ServletException,
                             java.io.IOException

Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread. The output of the target resources processing of the request is written directly to the current JspWriter returned by a call to getOut().

If flush is true, The current JspWriter "out" for this JSP is flushed as a side-effect of this call, prior to processing the include. Otherwise, the JspWriter "out" is not flushed.

If the relativeUrlPath begins with a "/" then the URL specified is calculated relative to the DOCROOT of the ServletContext for this JSP. If the path does not begin with a "/" then the URL specified is calculated relative to the URL of the request that was mapped to the calling JSP.

It is only valid to call this method from a Thread executing within a _jspService(...) method of a JSP.

Parameters:
relativeUrlPath - specifies the relative URL path to the target resource to be included
flush - True if the JspWriter is to be flushed before the include, or false if not.
Throws:
javax.servlet.ServletException - if the page that was forwarded to throws a ServletException
java.io.IOException - if an I/O error occurred while forwarding
Since:
2.0

handlePageException

public abstract void handlePageException(java.lang.Exception e)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException

This method is intended to process an unhandled 'page' level exception by forwarding the exception to the specified error page for this JSP. If forwarding is not possible (for example because the response has already been committed), an implementation dependent mechanism should be used to invoke the error page (e.g. "including" the error page instead).

If no error page is defined in the page, the exception should be rethrown so that the standard servlet error handling takes over.

A JSP implementation class shall typically clean up any local state prior to invoking this and will return immediately thereafter. It is illegal to generate any output to the client, or to modify any ServletResponse state after invoking this call.

This method is kept for backwards compatiblity reasons. Newly generated code should use PageContext.handlePageException(Throwable).

Parameters:
e - the exception to be handled
Throws:
javax.servlet.ServletException - if an error occurs while invoking the error page
java.io.IOException - if an I/O error occurred while invoking the error page
java.lang.NullPointerException - if the exception is null
See Also:
handlePageException(Throwable)

handlePageException

public abstract void handlePageException(java.lang.Throwable t)
                                  throws javax.servlet.ServletException,
                                         java.io.IOException

This method is intended to process an unhandled 'page' level exception by forwarding the exception to the specified error page for this JSP. If forwarding is not possible (for example because the response has already been committed), an implementation dependent mechanism should be used to invoke the error page (e.g. "including" the error page instead).

If no error page is defined in the page, the exception should be rethrown so that the standard servlet error handling takes over.

This method is intended to process an unhandled "page" level exception by redirecting the exception to either the specified error page for this JSP, or if none was specified, to perform some implementation dependent action.

A JSP implementation class shall typically clean up any local state prior to invoking this and will return immediately thereafter. It is illegal to generate any output to the client, or to modify any ServletResponse state after invoking this call.

Parameters:
t - the throwable to be handled
Throws:
javax.servlet.ServletException - if an error occurs while invoking the error page
java.io.IOException - if an I/O error occurred while invoking the error page
java.lang.NullPointerException - if the exception is null
See Also:
handlePageException(Exception)

pushBody

public BodyContent pushBody()
Return a new BodyContent object, save the current "out" JspWriter, and update the value of the "out" attribute in the page scope attribute namespace of the PageContext.

Returns:
the new BodyContent

getErrorData

public ErrorData getErrorData()
Provides convenient access to error information.

Returns:
an ErrorData instance containing information about the error, as obtained from the request attributes, as per the Servlet specification. If this is not an error page (that is, if the isErrorPage attribute of the page directive is not set to "true"), the information is meaningless.
Since:
2.0
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


PageData (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class PageData

java.lang.Object
    extended by javax.servlet.jsp.tagext.PageData
public abstract class PageData
extends java.lang.Object

Translation-time information on a JSP page. The information corresponds to the XML view of the JSP page.

Objects of this type are generated by the JSP translator, e.g. when being pased to a TagLibraryValidator instance.

Constructor Summary
PageData()
Sole constructor.
Method Summary
abstract  java.io.InputStream getInputStream()
Returns an input stream on the XML view of a JSP page.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PageData

public PageData()
Sole constructor. (For invocation by subclass constructors, typically implicit.)

Method Detail

getInputStream

public abstract java.io.InputStream getInputStream()
Returns an input stream on the XML view of a JSP page. The stream is encoded in UTF-8. Recall tht the XML view of a JSP page has the include directives expanded.

Returns:
An input stream on the document.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleTag (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Interface SimpleTag

All Superinterfaces:
JspTag
All Known Implementing Classes:
SimpleTagSupport
public interface SimpleTag
extends JspTag

Interface for defining Simple Tag Handlers.

Simple Tag Handlers differ from Classic Tag Handlers in that instead of supporting doStartTag() and doEndTag(), the SimpleTag interface provides a simple doTag() method, which is called once and only once for any given tag invocation. All tag logic, iteration, body evaluations, etc. are to be performed in this single method. Thus, simple tag handlers have the equivalent power of BodyTag, but with a much simpler lifecycle and interface.

To support body content, the setJspBody() method is provided. The container invokes the setJspBody() method with a JspFragment object encapsulating the body of the tag. The tag handler implementation can call invoke() on that fragment to evaluate the body as many times as it needs.

A SimpleTag handler must have a public no-args constructor. Most SimpleTag handlers should extend SimpleTagSupport.

Lifecycle

The following is a non-normative, brief overview of the SimpleTag lifecycle. Refer to the JSP Specification for details.

  1. A new tag handler instance is created each time by the container by calling the provided zero-args constructor. Unlike classic tag handlers, simple tag handlers are never cached and reused by the JSP container.
  2. The setJspContext() and setParent() methods are called by the container. The setParent() method is only called if the element is nested within another tag invocation.
  3. The setters for each attribute defined for this tag are called by the container.
  4. If a body exists, the setJspBody() method is called by the container to set the body of this tag, as a JspFragment. If the action element is empty in the page, this method is not called at all.
  5. The doTag() method is called by the container. All tag logic, iteration, body evaluations, etc. occur in this method.
  6. The doTag() method returns and all variables are synchronized.

Since:
2.0
See Also:
SimpleTagSupport

Method Summary
void | doTag() Called by the container to invoke this tag.
JspTag | getParent() Returns the parent of this tag, for collaboration purposes.
void | setJspBody(JspFragment jspBody) Provides the body of this tag as a JspFragment object, able to be invoked zero or more times by the tag handler.
void | setJspContext(JspContext pc) Called by the container to provide this tag handler with the JspContext for this invocation.
void | setParent(JspTag parent) Sets the parent of this tag, for collaboration purposes.

Method Detail

doTag

public void doTag()
           throws JspException,
                  java.io.IOException
Called by the container to invoke this tag. The implementation of this method is provided by the tag library developer, and handles all tag processing, body iteration, etc.

The JSP container will resynchronize any AT_BEGIN and AT_END variables (defined by the associated tag file, TagExtraInfo, or TLD) after the invocation of doTag().

Throws:
JspException - If an error occurred while processing this tag.
SkipPageException - If the page that (either directly or indirectly) invoked this tag is to cease evaluation. A Simple Tag Handler generated from a tag file must throw this exception if an invoked Classic Tag Handler returned SKIP_PAGE or if an invoked Simple Tag Handler threw SkipPageException or if an invoked Jsp Fragment threw a SkipPageException.
java.io.IOException - If there was an error writing to the output stream.

setParent

public void setParent(JspTag parent)
Sets the parent of this tag, for collaboration purposes.

The container invokes this method only if this tag invocation is nested within another tag invocation.

Parameters:
parent - the tag that encloses this tag

getParent

public JspTag getParent()
Returns the parent of this tag, for collaboration purposes.

Returns:
the parent of this tag

setJspContext

public void setJspContext(JspContext pc)
Called by the container to provide this tag handler with the JspContext for this invocation. An implementation should save this value.

Parameters:
pc - the page context for this invocation
See Also:
Tag.setPageContext(javax.servlet.jsp.PageContext)

setJspBody

public void setJspBody(JspFragment jspBody)
Provides the body of this tag as a JspFragment object, able to be invoked zero or more times by the tag handler.

This method is invoked by the JSP page implementation object prior to doTag(). If the action element is empty in the page, this method is not called at all.

Parameters:
jspBody - The fragment encapsulating the body of this tag.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleTagSupport (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class SimpleTagSupport

java.lang.Object
    extended by javax.servlet.jsp.tagext.SimpleTagSupport
All Implemented Interfaces:
JspTag, SimpleTag
public class SimpleTagSupport
extends java.lang.Object
implements SimpleTag

A base class for defining tag handlers implementing SimpleTag.

The SimpleTagSupport class is a utility class intended to be used as the base class for new simple tag handlers. The SimpleTagSupport class implements the SimpleTag interface and adds additional convenience methods including getter methods for the properties in SimpleTag.

Since:
2.0

Constructor Summary
SimpleTagSupport()
Sole constructor.
Method Summary
void | doTag() Default processing of the tag does nothing.
static JspTag | findAncestorWithClass(JspTag from, java.lang.Class klass) Find the instance of a given class type that is closest to a given instance.
protected JspFragment | getJspBody() Returns the body passed in by the container via setJspBody.
protected JspContext | getJspContext() Returns the page context passed in by the container via setJspContext.
JspTag | getParent() Returns the parent of this tag, for collaboration purposes.
void | setJspBody(JspFragment jspBody) Stores the provided JspFragment.
void | setJspContext(JspContext pc) Stores the provided JSP context in the private jspContext field.
void | setParent(JspTag parent) Sets the parent of this tag, for collaboration purposes.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SimpleTagSupport

public SimpleTagSupport()
Sole constructor. (For invocation by subclass constructors, typically implicit.)

Method Detail

doTag

public void doTag()
           throws JspException,
                  java.io.IOException
Default processing of the tag does nothing.

Specified by:
doTag in interface SimpleTag
Throws:
JspException - Subclasses can throw JspException to indicate an error occurred while processing this tag.
SkipPageException - If the page that (either directly or indirectly) invoked this tag is to cease evaluation. A Simple Tag Handler generated from a tag file must throw this exception if an invoked Classic Tag Handler returned SKIP_PAGE or if an invoked Simple Tag Handler threw SkipPageException or if an invoked Jsp Fragment threw a SkipPageException.
java.io.IOException - Subclasses can throw IOException if there was an error writing to the output stream
See Also:
SimpleTag.doTag()

setParent

public void setParent(JspTag parent)
Sets the parent of this tag, for collaboration purposes.

The container invokes this method only if this tag invocation is nested within another tag invocation.

Specified by:
setParent in interface SimpleTag
Parameters:
parent - the tag that encloses this tag

getParent

public JspTag getParent()
Returns the parent of this tag, for collaboration purposes.

Specified by:
getParent in interface SimpleTag
Returns:
the parent of this tag

setJspContext

public void setJspContext(JspContext pc)
Stores the provided JSP context in the private jspContext field. Subclasses can access the JspContext via getJspContext().

Specified by:
setJspContext in interface SimpleTag
Parameters:
pc - the page context for this invocation
See Also:
SimpleTag.setJspContext(javax.servlet.jsp.JspContext)

getJspContext

protected JspContext getJspContext()
Returns the page context passed in by the container via setJspContext.

Returns:
the page context for this invocation

setJspBody

public void setJspBody(JspFragment jspBody)
Stores the provided JspFragment.

Specified by:
setJspBody in interface SimpleTag
Parameters:
jspBody - The fragment encapsulating the body of this tag. If the action element is empty in the page, this method is not called at all.
See Also:
SimpleTag.setJspBody(javax.servlet.jsp.tagext.JspFragment)

getJspBody

protected JspFragment getJspBody()
Returns the body passed in by the container via setJspBody.

Returns:
the fragment encapsulating the body of this tag, or null if the action element is empty in the page.

findAncestorWithClass

public static final JspTag findAncestorWithClass(JspTag from,
                                                 java.lang.Class klass)
Find the instance of a given class type that is closest to a given instance. This method uses the getParent method from the Tag and/or SimpleTag interfaces. This method is used for coordination among cooperating tags.

For every instance of TagAdapter encountered while traversing the ancestors, the tag handler returned by TagAdapter.getAdaptee() - instead of the TagAdpater itself - is compared to klass. If the tag handler matches, it - and not its TagAdapter - is returned.

The current version of the specification only provides one formal way of indicating the observable type of a tag handler: its tag handler implementation class, described in the tag-class subelement of the tag element. This is extended in an informal manner by allowing the tag library author to indicate in the description subelement an observable type. The type should be a subtype of the tag handler implementation class or void. This addititional constraint can be exploited by a specialized container that knows about that specific tag library, as in the case of the JSP standard tag library.

When a tag library author provides information on the observable type of a tag handler, client programmatic code should adhere to that constraint. Specifically, the Class passed to findAncestorWithClass should be a subtype of the observable type.

Parameters:
from - The instance from where to start looking.
klass - The subclass of JspTag or interface to be matched
Returns:
the nearest ancestor that implements the interface or is an instance of the class specified
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SkipPageException (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp
Class SkipPageException

java.lang.Object
    extended by java.lang.Throwable
        extended by java.lang.Exception
            extended by javax.servlet.jsp.JspException
                extended by javax.servlet.jsp.SkipPageException
All Implemented Interfaces:
java.io.Serializable
public class SkipPageException
extends JspException

Exception to indicate the calling page must cease evaluation. Thrown by a simple tag handler to indicate that the remainder of the page must not be evaluated. The result is propagated back to the pagein the case where one tag invokes another (as can be the case with tag files). The effect is similar to that of a Classic Tag Handler returning Tag.SKIP_PAGE from doEndTag(). Jsp Fragments may also throw this exception. This exception should not be thrown manually in a JSP page or tag file - the behavior is undefined. The exception is intended to be thrown inside SimpleTag handlers and in JSP fragments.

Since:
2.0
See Also:
SimpleTag.doTag(),
JspFragment.invoke(java.io.Writer),
Tag.doEndTag(),
Serialized Form

Constructor Summary
SkipPageException()
Creates a SkipPageException with no message.
SkipPageException(java.lang.String message)
Creates a SkipPageException with the provided message.
SkipPageException(java.lang.String message, java.lang.Throwable rootCause)
Creates a SkipPageException with the provided message and root cause.
SkipPageException(java.lang.Throwable rootCause)
Creates a SkipPageException with the provided root cause.
Methods inherited from class javax.servlet.jsp.JspException
getRootCause
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SkipPageException

public SkipPageException()
Creates a SkipPageException with no message.

SkipPageException

public SkipPageException(java.lang.String message)
Creates a SkipPageException with the provided message.

Parameters:
message - the detail message

SkipPageException

public SkipPageException(java.lang.String message,
                         java.lang.Throwable rootCause)
Creates a SkipPageException with the provided message and root cause.

Parameters:
message - the detail message
rootCause - the originating cause of this exception

SkipPageException

public SkipPageException(java.lang.Throwable rootCause)
Creates a SkipPageException with the provided root cause.

Parameters:
rootCause - the originating cause of this exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Tag (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Interface Tag

All Superinterfaces:
JspTag
All Known Subinterfaces:
BodyTag, IterationTag
All Known Implementing Classes:
BodyTagSupport, TagAdapter, TagSupport
public interface Tag
extends JspTag

The interface of a classic tag handler that does not want to manipulate its body. The Tag interface defines the basic protocol between a Tag handler and JSP page implementation class. It defines the life cycle and the methods to be invoked at start and end tag.

Properties

The Tag interface specifies the setter and getter methods for the core pageContext and parent properties.

The JSP page implementation object invokes setPageContext and setParent, in that order, before invoking doStartTag() or doEndTag().

Methods

There are two main actions: doStartTag and doEndTag. Once all appropriate properties have been initialized, the doStartTag and doEndTag methods can be invoked on the tag handler. Between these invocations, the tag handler is assumed to hold a state that must be preserved. After the doEndTag invocation, the tag handler is available for further invocations (and it is expected to have retained its properties).

Lifecycle

Lifecycle details are described by the transition diagram below, with the following comments:

  • [1] This transition is intended to be for releasing long-term data. no guarantees are assumed on whether any properties have been retained or not.
  • [2] This transition happens if and only if the tag ends normally without raising an exception
  • [3] Some setters may be called again before a tag handler is reused. For instance, setParent() is called if it's reused within the same page but at a different level, setPageContext() is called if it's used in another page, and attribute setters are called if the values differ or are expressed as request-time attribute values.
  • Check the TryCatchFinally interface for additional details related to exception handling and resource management.

Lifecycle Details Transition Diagram for Tag

Once all invocations on the tag handler are completed, the release method is invoked on it. Once a release method is invoked all properties, including parent and pageContext, are assumed to have been reset to an unspecified value. The page compiler guarantees that release() will be invoked on the Tag handler before the handler is released to the GC.

Empty and Non-Empty Action

If the TagLibraryDescriptor file indicates that the action must always have an empty action, by an <body-content> entry of "empty", then the doStartTag() method must return SKIP_BODY.

Otherwise, the doStartTag() method may return SKIP_BODY or EVAL_BODY_INCLUDE.

If SKIP_BODY is returned the body, if present, is not evaluated.

If EVAL_BODY_INCLUDE is returned, the body is evaluated and "passed through" to the current out.

Field Summary
static int | EVAL_BODY_INCLUDE Evaluate body into existing out stream.
static int | EVAL_PAGE Continue evaluating the page.
static int | SKIP_BODY Skip body evaluation.
static int | SKIP_PAGE Skip the rest of the page.
Method Summary
int | doEndTag() Process the end tag for this instance.
int | doStartTag() Process the start tag for this instance.
Tag | getParent() Get the parent (closest enclosing tag handler) for this tag handler.
void | release() Called on a Tag handler to release state.
void | setPageContext(PageContext pc) Set the current page context.
void | setParent(Tag t) Set the parent (closest enclosing tag handler) of this tag handler.

Field Detail

SKIP_BODY

public static final int SKIP_BODY
Skip body evaluation. Valid return value for doStartTag and doAfterBody.

See Also:
Constant Field Values

EVAL_BODY_INCLUDE

public static final int EVAL_BODY_INCLUDE
Evaluate body into existing out stream. Valid return value for doStartTag.

See Also:
Constant Field Values

SKIP_PAGE

public static final int SKIP_PAGE
Skip the rest of the page. Valid return value for doEndTag.

See Also:
Constant Field Values

EVAL_PAGE

public static final int EVAL_PAGE
Continue evaluating the page. Valid return value for doEndTag().

See Also:
Constant Field Values
Method Detail

setPageContext

public void setPageContext(PageContext pc)
Set the current page context. This method is invoked by the JSP page implementation object prior to doStartTag().

This value is *not* reset by doEndTag() and must be explicitly reset by a page implementation if it changes between calls to doStartTag().

Parameters:
pc - The page context for this tag handler.

setParent

public void setParent(Tag t)
Set the parent (closest enclosing tag handler) of this tag handler. Invoked by the JSP page implementation object prior to doStartTag().

This value is *not* reset by doEndTag() and must be explicitly reset by a page implementation.

Parameters:
t - The parent tag, or null.

getParent

public Tag getParent()
Get the parent (closest enclosing tag handler) for this tag handler.

The getParent() method can be used to navigate the nested tag handler structure at runtime for cooperation among custom actions; for example, the findAncestorWithClass() method in TagSupport provides a convenient way of doing this.

The current version of the specification only provides one formal way of indicating the observable type of a tag handler: its tag handler implementation class, described in the tag-class subelement of the tag element. This is extended in an informal manner by allowing the tag library author to indicate in the description subelement an observable type. The type should be a subtype of the tag handler implementation class or void. This addititional constraint can be exploited by a specialized container that knows about that specific tag library, as in the case of the JSP standard tag library.

Returns:
the current parent, or null if none.
See Also:
TagSupport.findAncestorWithClass(javax.servlet.jsp.tagext.Tag, java.lang.Class)

doStartTag

public int doStartTag()
               throws JspException
Process the start tag for this instance. This method is invoked by the JSP page implementation object.

The doStartTag method assumes that the properties pageContext and parent have been set. It also assumes that any properties exposed as attributes have been set too. When this method is invoked, the body has not yet been evaluated.

This method returns Tag.EVAL_BODY_INCLUDE or BodyTag.EVAL_BODY_BUFFERED to indicate that the body of the action should be evaluated or SKIP_BODY to indicate otherwise.

When a Tag returns EVAL_BODY_INCLUDE the result of evaluating the body (if any) is included into the current "out" JspWriter as it happens and then doEndTag() is invoked.

BodyTag.EVAL_BODY_BUFFERED is only valid if the tag handler implements BodyTag.

The JSP container will resynchronize the values of any AT_BEGIN and NESTED variables (defined by the associated TagExtraInfo or TLD) after the invocation of doStartTag(), except for a tag handler implementing BodyTag whose doStartTag() method returns BodyTag.EVAL_BODY_BUFFERED.

Returns:
EVAL_BODY_INCLUDE if the tag wants to process body, SKIP_BODY if it does not want to process it.
Throws:
JspException - if an error occurred while processing this tag
See Also:
BodyTag

doEndTag

public int doEndTag()
             throws JspException
Process the end tag for this instance. This method is invoked by the JSP page implementation object on all Tag handlers.

This method will be called after returning from doStartTag. The body of the action may or may not have been evaluated, depending on the return value of doStartTag.

If this method returns EVAL_PAGE, the rest of the page continues to be evaluated. If this method returns SKIP_PAGE, the rest of the page is not evaluated, the request is completed, and the doEndTag() methods of enclosing tags are not invoked. If this request was forwarded or included from another page (or Servlet), only the current page evaluation is stopped.

The JSP container will resynchronize the values of any AT_BEGIN and AT_END variables (defined by the associated TagExtraInfo or TLD) after the invocation of doEndTag().

Returns:
indication of whether to continue evaluating the JSP page.
Throws:
JspException - if an error occurred while processing this tag

release

public void release()
Called on a Tag handler to release state. The page compiler guarantees that JSP page implementation objects will invoke this method on all tag handlers, but there may be multiple invocations on doStartTag and doEndTag in between.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TagAdapter (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class TagAdapter

java.lang.Object
    extended by javax.servlet.jsp.tagext.TagAdapter
All Implemented Interfaces:
JspTag, Tag
public class TagAdapter
extends java.lang.Object
implements Tag

Wraps any SimpleTag and exposes it using a Tag interface. This is used to allow collaboration between classic Tag handlers and SimpleTag handlers.

Because SimpleTag does not extend Tag, and because Tag.setParent() only accepts a Tag instance, a classic tag handler (one that implements Tag) cannot have a SimpleTag as its parent. To remedy this, a TagAdapter is created to wrap the SimpleTag parent, and the adapter is passed to setParent() instead. A classic Tag Handler can call getAdaptee() to retrieve the encapsulated SimpleTag instance.

Since:
2.0

Field Summary
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor Summary
TagAdapter(SimpleTag adaptee)
Creates a new TagAdapter that wraps the given SimpleTag and returns the parent tag when getParent() is called.
Method Summary
 int doEndTag()
Must not be called.
 int doStartTag()
Must not be called.
 JspTag getAdaptee()
Gets the tag that is being adapted to the Tag interface.
 Tag getParent()
Returns the parent of this tag, which is always getAdaptee().getParent().
 void release()
Must not be called.
 void setPageContext(PageContext pc)
Must not be called.
 void setParent(Tag parentTag)
Must not be called.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TagAdapter

public TagAdapter(SimpleTag adaptee)
Creates a new TagAdapter that wraps the given SimpleTag and returns the parent tag when getParent() is called.

Parameters:
adaptee - The SimpleTag being adapted as a Tag.
Method Detail

setPageContext

public void setPageContext(PageContext pc)
Must not be called.

Specified by:
setPageContext in interface Tag
Parameters:
pc - ignored.
Throws:
java.lang.UnsupportedOperationException - Must not be called

setParent

public void setParent(Tag parentTag)
Must not be called. The parent of this tag is always getAdaptee().getParent().

Specified by:
setParent in interface Tag
Parameters:
parentTag - ignored.
Throws:
java.lang.UnsupportedOperationException - Must not be called.

getParent

public Tag getParent()
Returns the parent of this tag, which is always getAdaptee().getParent(). This will either be the enclosing Tag (if getAdaptee().getParent() implements Tag), or an adapter to the enclosing Tag (if getAdaptee().getParent() does not implement Tag).

Specified by:
getParent in interface Tag
Returns:
The parent of the tag being adapted.
See Also:
TagSupport.findAncestorWithClass(javax.servlet.jsp.tagext.Tag, java.lang.Class)

getAdaptee

public JspTag getAdaptee()
Gets the tag that is being adapted to the Tag interface. This should be an instance of SimpleTag in JSP 2.0, but room is left for other kinds of tags in future spec versions.

Returns:
the tag that is being adapted

doStartTag

public int doStartTag()
               throws JspException
Must not be called.

Specified by:
doStartTag in interface Tag
Returns:
always throws UnsupportedOperationException
Throws:
java.lang.UnsupportedOperationException - Must not be called
JspException - never thrown
See Also:
BodyTag

doEndTag

public int doEndTag()
             throws JspException
Must not be called.

Specified by:
doEndTag in interface Tag
Returns:
always throws UnsupportedOperationException
Throws:
java.lang.UnsupportedOperationException - Must not be called
JspException - never thrown

release

public void release()
Must not be called.

Specified by:
release in interface Tag
Throws:
java.lang.UnsupportedOperationException - Must not be called
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TagAttributeInfo (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class TagAttributeInfo

java.lang.Object
    extended by javax.servlet.jsp.tagext.TagAttributeInfo
public class TagAttributeInfo
extends java.lang.Object

Information on the attributes of a Tag, available at translation time. This class is instantiated from the Tag Library Descriptor file (TLD).

Only the information needed to generate code is included here. Other information like SCHEMA for validation belongs elsewhere.

Field Summary
static java.lang.String ID
"id" is wired in to be ID.
Constructor Summary
TagAttributeInfo(java.lang.String name, boolean required, java.lang.String type, boolean reqTime)
Constructor for TagAttributeInfo.
TagAttributeInfo(java.lang.String name, boolean required, java.lang.String type, boolean reqTime, boolean fragment)
JSP 2.0 Constructor for TagAttributeInfo.
Method Summary
boolean | canBeRequestTime() Whether this attribute can hold a request-time value.
static TagAttributeInfo | getIdAttribute(TagAttributeInfo[] a) Convenience static method that goes through an array of TagAttributeInfo objects and looks for "id".
java.lang.String | getName() The name of this attribute.
java.lang.String | getTypeName() The type (as a String) of this attribute.
boolean | isFragment() Whether this attribute is of type JspFragment.
boolean | isRequired() Whether this attribute is required.
java.lang.String | toString() Returns a String representation of this TagAttributeInfo, suitable for debugging purposes.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

ID

public static final java.lang.String ID
"id" is wired in to be ID. There is no real benefit in having it be something else IDREFs are not handled any differently.

See Also:
Constant Field Values
Constructor Detail

TagAttributeInfo

public TagAttributeInfo(java.lang.String name,
                        boolean required,
                        java.lang.String type,
                        boolean reqTime)
Constructor for TagAttributeInfo. This class is to be instantiated only from the TagLibrary code under request from some JSP code that is parsing a TLD (Tag Library Descriptor).

Parameters:
name - The name of the attribute.
required - If this attribute is required in tag instances.
type - The name of the type of the attribute.
reqTime - Whether this attribute holds a request-time Attribute.

TagAttributeInfo

public TagAttributeInfo(java.lang.String name,
                        boolean required,
                        java.lang.String type,
                        boolean reqTime,
                        boolean fragment)
JSP 2.0 Constructor for TagAttributeInfo. This class is to be instantiated only from the TagLibrary code under request from some JSP code that is parsing a TLD (Tag Library Descriptor).

Parameters:
name - The name of the attribute.
required - If this attribute is required in tag instances.
type - The name of the type of the attribute.
reqTime - Whether this attribute holds a request-time Attribute.
fragment - Whether this attribute is of type JspFragment
Since:
2.0
Method Detail

getName

public java.lang.String getName()
The name of this attribute.

Returns:
the name of the attribute

getTypeName

public java.lang.String getTypeName()
The type (as a String) of this attribute.

Returns:
the type of the attribute

canBeRequestTime

public boolean canBeRequestTime()
Whether this attribute can hold a request-time value.

Returns:
if the attribute can hold a request-time value.

isRequired

public boolean isRequired()
Whether this attribute is required.

Returns:
if the attribute is required.

getIdAttribute

public static TagAttributeInfo getIdAttribute(TagAttributeInfo[] a)
Convenience static method that goes through an array of TagAttributeInfo objects and looks for "id".

Parameters:
a - An array of TagAttributeInfo
Returns:
The TagAttributeInfo reference with name "id"

isFragment

public boolean isFragment()
Whether this attribute is of type JspFragment.

Returns:
if the attribute is of type JspFragment
Since:
2.0

toString

public java.lang.String toString()
Returns a String representation of this TagAttributeInfo, suitable for debugging purposes.

Returns:
a String representation of this TagAttributeInfo
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TagData (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class TagData

java.lang.Object
    extended by javax.servlet.jsp.tagext.TagData
All Implemented Interfaces:
java.lang.Cloneable
public class TagData
extends java.lang.Object
implements java.lang.Cloneable

The (translation-time only) attribute/value information for a tag instance.

TagData is only used as an argument to the isValid, validate, and getVariableInfo methods of TagExtraInfo, which are invoked at translation time.

Field Summary
static java.lang.Object REQUEST_TIME_VALUE
Distinguished value for an attribute to indicate its value is a request-time expression (which is not yet available because TagData instances are used at translation-time).
Constructor Summary
TagData(java.util.Hashtable attrs)
Constructor for a TagData.
TagData(java.lang.Object[][] atts)
Constructor for TagData.
Method Summary
java.lang.Object | getAttribute(java.lang.String attName) The value of the attribute.
java.util.Enumeration | getAttributes() Enumerates the attributes.
java.lang.String | getAttributeString(java.lang.String attName) Get the value for a given attribute.
java.lang.String | getId() The value of the tag's id attribute.
void | setAttribute(java.lang.String attName, java.lang.Object value) Set the value of an attribute.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

REQUEST_TIME_VALUE

public static final java.lang.Object REQUEST_TIME_VALUE
Distinguished value for an attribute to indicate its value is a request-time expression (which is not yet available because TagData instances are used at translation-time).

Constructor Detail

TagData

public TagData(java.lang.Object[][] atts)
Constructor for TagData.

A typical constructor may be

 static final Object[][] att = {{"connection", "conn0"}, {"id", "query0"}};
 static final TagData td = new TagData(att);
All values must be Strings except for those holding the distinguished object REQUEST_TIME_VALUE.

Parameters:
atts - the static attribute and values. May be null.

TagData

public TagData(java.util.Hashtable attrs)
Constructor for a TagData. If you already have the attributes in a hashtable, use this constructor.

Parameters:
attrs - A hashtable to get the values from.
Method Detail

getId

public java.lang.String getId()
The value of the tag's id attribute.

Returns:
the value of the tag's id attribute, or null if no such attribute was specified.

getAttribute

public java.lang.Object getAttribute(java.lang.String attName)
The value of the attribute. If a static value is specified for an attribute that accepts a request-time attribute expression then that static value is returned, even if the value is provided in the body of a action. The distinguished object REQUEST_TIME_VALUE is only returned if the value is specified as a request-time attribute expression or via the <jsp:attribute> action with a body that contains dynamic content (scriptlets, scripting expressions, EL expressions, standard actions, or custom actions). Returns null if the attribute is not set.

Parameters:
attName - the name of the attribute
Returns:
the attribute's value

setAttribute

public void setAttribute(java.lang.String attName,
                         java.lang.Object value)
Set the value of an attribute.

Parameters:
attName - the name of the attribute
value - the value.

getAttributeString

public java.lang.String getAttributeString(java.lang.String attName)
Get the value for a given attribute.

Parameters:
attName - the name of the attribute
Returns:
the attribute value string
Throws:
java.lang.ClassCastException - if attribute value is not a String

getAttributes

public java.util.Enumeration getAttributes()
Enumerates the attributes.

Returns:
An enumeration of the attributes in a TagData
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TagExtraInfo (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class TagExtraInfo

java.lang.Object
    extended by javax.servlet.jsp.tagext.TagExtraInfo
public abstract class TagExtraInfo
extends java.lang.Object

Optional class provided by the tag library author to describe additional translation-time information not described in the TLD. The TagExtraInfo class is mentioned in the Tag Library Descriptor file (TLD).

This class can be used:

  • to indicate that the tag defines scripting variables
  • to perform translation-time validation of the tag attributes.

It is the responsibility of the JSP translator that the initial value to be returned by calls to getTagInfo() corresponds to a TagInfo object for the tag being translated. If an explicit call to setTagInfo() is done, then the object passed will be returned in subsequent calls to getTagInfo().

The only way to affect the value returned by getTagInfo() is through a setTagInfo() call, and thus, TagExtraInfo.setTagInfo() is to be called by the JSP translator, with a TagInfo object that corresponds to the tag being translated. The call should happen before any invocation on validate() and before any invocation on getVariableInfo().

NOTE: It is a (translation time) error for a tag definition in a TLD with one or more variable subelements to have an associated TagExtraInfo implementation that returns a VariableInfo array with one or more elements from a call to getVariableInfo().

Constructor Summary
TagExtraInfo()
Sole constructor.
Method Summary
TagInfo | getTagInfo() Get the TagInfo for this class.
VariableInfo[] | getVariableInfo(TagData data) information on scripting variables defined by the tag associated with this TagExtraInfo instance.
boolean | isValid(TagData data) Translation-time validation of the attributes.
void | setTagInfo(TagInfo tagInfo) Set the TagInfo for this class.
ValidationMessage[] | validate(TagData data) Translation-time validation of the attributes.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TagExtraInfo

public TagExtraInfo()
Sole constructor. (For invocation by subclass constructors, typically implicit.)

Method Detail

getVariableInfo

public VariableInfo[] getVariableInfo(TagData data)
information on scripting variables defined by the tag associated with this TagExtraInfo instance. Request-time attributes are indicated as such in the TagData parameter.

Parameters:
data - The TagData instance.
Returns:
An array of VariableInfo data, or null or a zero length array if no scripting variables are to be defined.

isValid

public boolean isValid(TagData data)
Translation-time validation of the attributes. Request-time attributes are indicated as such in the TagData parameter. Note that the preferred way to do validation is with the validate() method, since it can return more detailed information.

Parameters:
data - The TagData instance.
Returns:
Whether this tag instance is valid.
See Also:
validate(javax.servlet.jsp.tagext.TagData)

validate

public ValidationMessage[] validate(TagData data)
Translation-time validation of the attributes. Request-time attributes are indicated as such in the TagData parameter. Because of the higher quality validation messages possible, this is the preferred way to do validation (although isValid() still works).

JSP 2.0 and higher containers call validate() instead of isValid(). The default implementation of this method is to call isValid(). If isValid() returns false, a generic ValidationMessage[] is returned indicating isValid() returned false.

Parameters:
data - The TagData instance.
Returns:
A null object, or zero length array if no errors, an array of ValidationMessages otherwise.
Since:
2.0

setTagInfo

public final void setTagInfo(TagInfo tagInfo)
Set the TagInfo for this class.

Parameters:
tagInfo - The TagInfo this instance is extending

getTagInfo

public final TagInfo getTagInfo()
Get the TagInfo for this class.

Returns:
the taginfo instance this instance is extending
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TagFileInfo (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class TagFileInfo

java.lang.Object
    extended by javax.servlet.jsp.tagext.TagFileInfo
public class TagFileInfo
extends java.lang.Object

Tag information for a tag file in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.

Since:
2.0

Constructor Summary
TagFileInfo(java.lang.String name, java.lang.String path, TagInfo tagInfo)
Constructor for TagFileInfo from data in the JSP 2.0 format for TLD.
Method Summary
java.lang.String | getName() The unique action name of this tag.
java.lang.String | getPath() Where to find the .tag file implementing this action.
TagInfo | getTagInfo() Returns information about this tag, parsed from the directives in the tag file.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TagFileInfo

public TagFileInfo(java.lang.String name,
                   java.lang.String path,
                   TagInfo tagInfo)
Constructor for TagFileInfo from data in the JSP 2.0 format for TLD. This class is to be instantiated only from the TagLibrary code under request from some JSP code that is parsing a TLD (Tag Library Descriptor). Note that, since TagLibibraryInfo reflects both TLD information and taglib directive information, a TagFileInfo instance is dependent on a taglib directive. This is probably a design error, which may be fixed in the future.

Parameters:
name - The unique action name of this tag
path - Where to find the .tag file implementing this action, relative to the location of the TLD file.
tagInfo - The detailed information about this tag, as parsed from the directives in the tag file.
Method Detail

getName

public java.lang.String getName()
The unique action name of this tag.

Returns:
The (short) name of the tag.

getPath

public java.lang.String getPath()
Where to find the .tag file implementing this action.

Returns:
The path of the tag file, relative to the TLD, or "." if the tag file was defined in an implicit tag file.

getTagInfo

public TagInfo getTagInfo()
Returns information about this tag, parsed from the directives in the tag file.

Returns:
a TagInfo object containing information about this tag
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TagInfo (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class TagInfo

java.lang.Object
    extended by javax.servlet.jsp.tagext.TagInfo
public class TagInfo
extends java.lang.Object

Tag information for a tag in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.

Field Summary
static java.lang.String | BODY_CONTENT_EMPTY Static constant for getBodyContent() when it is empty.
static java.lang.String | BODY_CONTENT_JSP Static constant for getBodyContent() when it is JSP.
static java.lang.String | BODY_CONTENT_SCRIPTLESS Static constant for getBodyContent() when it is scriptless.
static java.lang.String | BODY_CONTENT_TAG_DEPENDENT Static constant for getBodyContent() when it is Tag dependent.
Constructor Summary
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodycontent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo)
Constructor for TagInfo from data in the JSP 1.1 format for TLD.
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodycontent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo, java.lang.String displayName, java.lang.String smallIcon, java.lang.String largeIcon, TagVariableInfo[] tvi)
Constructor for TagInfo from data in the JSP 1.2 format for TLD.
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodycontent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo, java.lang.String displayName, java.lang.String smallIcon, java.lang.String largeIcon, TagVariableInfo[] tvi, boolean dynamicAttributes)
Constructor for TagInfo from data in the JSP 2.0 format for TLD.
Method Summary
TagAttributeInfo[] | getAttributes() Attribute information (in the TLD) on this tag.
java.lang.String | getBodyContent() The bodycontent information for this tag.
java.lang.String | getDisplayName() Get the displayName.
java.lang.String | getInfoString() The information string for the tag.
java.lang.String | getLargeIcon() Get the path to the large icon.
java.lang.String | getSmallIcon() Get the path to the small icon.
java.lang.String | getTagClassName() Name of the class that provides the handler for this tag.
TagExtraInfo | getTagExtraInfo() The instance (if any) for extra tag information.
TagLibraryInfo | getTagLibrary() The instance of TabLibraryInfo we belong to.
java.lang.String | getTagName() The name of the Tag.
TagVariableInfo[] | getTagVariableInfos() Get TagVariableInfo objects associated with this TagInfo.
VariableInfo[] | getVariableInfo(TagData data) Information on the scripting objects created by this tag at runtime.
boolean | hasDynamicAttributes() Get dynamicAttributes associated with this TagInfo.
boolean | isValid(TagData data) Translation-time validation of the attributes.
void | setTagExtraInfo(TagExtraInfo tei) Set the instance for extra tag information.
void | setTagLibrary(TagLibraryInfo tl) Set the TagLibraryInfo property.
ValidationMessage[] | validate(TagData data) Translation-time validation of the attributes.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

BODY_CONTENT_JSP

public static final java.lang.String BODY_CONTENT_JSP
Static constant for getBodyContent() when it is JSP.

See Also:
Constant Field Values

BODY_CONTENT_TAG_DEPENDENT

public static final java.lang.String BODY_CONTENT_TAG_DEPENDENT
Static constant for getBodyContent() when it is Tag dependent.

See Also:
Constant Field Values

BODY_CONTENT_EMPTY

public static final java.lang.String BODY_CONTENT_EMPTY
Static constant for getBodyContent() when it is empty.

See Also:
Constant Field Values

BODY_CONTENT_SCRIPTLESS

public static final java.lang.String BODY_CONTENT_SCRIPTLESS
Static constant for getBodyContent() when it is scriptless.

Since:
2.0
See Also:
Constant Field Values
Constructor Detail

TagInfo

public TagInfo(java.lang.String tagName,
               java.lang.String tagClassName,
               java.lang.String bodycontent,
               java.lang.String infoString,
               TagLibraryInfo taglib,
               TagExtraInfo tagExtraInfo,
               TagAttributeInfo[] attributeInfo)
Constructor for TagInfo from data in the JSP 1.1 format for TLD. This class is to be instantiated only from the TagLibrary code under request from some JSP code that is parsing a TLD (Tag Library Descriptor). Note that, since TagLibibraryInfo reflects both TLD information and taglib directive information, a TagInfo instance is dependent on a taglib directive. This is probably a design error, which may be fixed in the future.

Parameters:
tagName - The name of this tag
tagClassName - The name of the tag handler class
bodycontent - Information on the body content of these tags
infoString - The (optional) string information for this tag
taglib - The instance of the tag library that contains us.
tagExtraInfo - The instance providing extra Tag info. May be null
attributeInfo - An array of AttributeInfo data from descriptor. May be null;

TagInfo

public TagInfo(java.lang.String tagName,
               java.lang.String tagClassName,
               java.lang.String bodycontent,
               java.lang.String infoString,
               TagLibraryInfo taglib,
               TagExtraInfo tagExtraInfo,
               TagAttributeInfo[] attributeInfo,
               java.lang.String displayName,
               java.lang.String smallIcon,
               java.lang.String largeIcon,
               TagVariableInfo[] tvi)
Constructor for TagInfo from data in the JSP 1.2 format for TLD. This class is to be instantiated only from the TagLibrary code under request from some JSP code that is parsing a TLD (Tag Library Descriptor). Note that, since TagLibibraryInfo reflects both TLD information and taglib directive information, a TagInfo instance is dependent on a taglib directive. This is probably a design error, which may be fixed in the future.

Parameters:
tagName - The name of this tag
tagClassName - The name of the tag handler class
bodycontent - Information on the body content of these tags
infoString - The (optional) string information for this tag
taglib - The instance of the tag library that contains us.
tagExtraInfo - The instance providing extra Tag info. May be null
attributeInfo - An array of AttributeInfo data from descriptor. May be null;
displayName - A short name to be displayed by tools
smallIcon - Path to a small icon to be displayed by tools
largeIcon - Path to a large icon to be displayed by tools
tvi - An array of a TagVariableInfo (or null)

TagInfo

public TagInfo(java.lang.String tagName,
               java.lang.String tagClassName,
               java.lang.String bodycontent,
               java.lang.String infoString,
               TagLibraryInfo taglib,
               TagExtraInfo tagExtraInfo,
               TagAttributeInfo[] attributeInfo,
               java.lang.String displayName,
               java.lang.String smallIcon,
               java.lang.String largeIcon,
               TagVariableInfo[] tvi,
               boolean dynamicAttributes)
Constructor for TagInfo from data in the JSP 2.0 format for TLD. This class is to be instantiated only from the TagLibrary code under request from some JSP code that is parsing a TLD (Tag Library Descriptor). Note that, since TagLibibraryInfo reflects both TLD information and taglib directive information, a TagInfo instance is dependent on a taglib directive. This is probably a design error, which may be fixed in the future.

Parameters:
tagName - The name of this tag
tagClassName - The name of the tag handler class
bodycontent - Information on the body content of these tags
infoString - The (optional) string information for this tag
taglib - The instance of the tag library that contains us.
tagExtraInfo - The instance providing extra Tag info. May be null
attributeInfo - An array of AttributeInfo data from descriptor. May be null;
displayName - A short name to be displayed by tools
smallIcon - Path to a small icon to be displayed by tools
largeIcon - Path to a large icon to be displayed by tools
tvi - An array of a TagVariableInfo (or null)
dynamicAttributes - True if supports dynamic attributes
Since:
2.0
Method Detail

getTagName

public java.lang.String getTagName()
The name of the Tag.

Returns:
The (short) name of the tag.

getAttributes

public TagAttributeInfo[] getAttributes()
Attribute information (in the TLD) on this tag. The return is an array describing the attributes of this tag, as indicated in the TLD.

Returns:
The array of TagAttributeInfo for this tag, or a zero-length array if the tag has no attributes.

getVariableInfo

public VariableInfo[] getVariableInfo(TagData data)
Information on the scripting objects created by this tag at runtime. This is a convenience method on the associated TagExtraInfo class.

Parameters:
data - TagData describing this action.
Returns:
if a TagExtraInfo object is associated with this TagInfo, the result of getTagExtraInfo().getVariableInfo( data ), otherwise null.

isValid

public boolean isValid(TagData data)
Translation-time validation of the attributes. This is a convenience method on the associated TagExtraInfo class.

Parameters:
data - The translation-time TagData instance.
Returns:
Whether the data is valid.

validate

public ValidationMessage[] validate(TagData data)
Translation-time validation of the attributes. This is a convenience method on the associated TagExtraInfo class.

Parameters:
data - The translation-time TagData instance.
Returns:
A null object, or zero length array if no errors, an array of ValidationMessages otherwise.
Since:
2.0

setTagExtraInfo

public void setTagExtraInfo(TagExtraInfo tei)
Set the instance for extra tag information.

Parameters:
tei - the TagExtraInfo instance

getTagExtraInfo

public TagExtraInfo getTagExtraInfo()
The instance (if any) for extra tag information.

Returns:
The TagExtraInfo instance, if any.

getTagClassName

public java.lang.String getTagClassName()
Name of the class that provides the handler for this tag.

Returns:
The name of the tag handler class.

getBodyContent

public java.lang.String getBodyContent()
The bodycontent information for this tag. If the bodycontent is not defined for this tag, the default of JSP will be returned.

Returns:
the body content string.

getInfoString

public java.lang.String getInfoString()
The information string for the tag.

Returns:
the info string, or null if not defined

setTagLibrary

public void setTagLibrary(TagLibraryInfo tl)
Set the TagLibraryInfo property. Note that a TagLibraryInfo element is dependent not just on the TLD information but also on the specific taglib instance used. This means that a fair amount of work needs to be done to construct and initialize TagLib objects. If used carefully, this setter can be used to avoid having to create new TagInfo elements for each taglib directive.

Parameters:
tl - the TagLibraryInfo to assign

getTagLibrary

public TagLibraryInfo getTagLibrary()
The instance of TabLibraryInfo we belong to.

Returns:
the tag library instance we belong to

getDisplayName

public java.lang.String getDisplayName()
Get the displayName.

Returns:
A short name to be displayed by tools, or null if not defined

getSmallIcon

public java.lang.String getSmallIcon()
Get the path to the small icon.

Returns:
Path to a small icon to be displayed by tools, or null if not defined

getLargeIcon

public java.lang.String getLargeIcon()
Get the path to the large icon.

Returns:
Path to a large icon to be displayed by tools, or null if not defined

getTagVariableInfos

public TagVariableInfo[] getTagVariableInfos()
Get TagVariableInfo objects associated with this TagInfo.

Returns:
Array of TagVariableInfo objects corresponding to variables declared by this tag, or a zero length array if no variables have been declared

hasDynamicAttributes

public boolean hasDynamicAttributes()
Get dynamicAttributes associated with this TagInfo.

Returns:
True if tag handler supports dynamic attributes
Since:
2.0
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TagLibraryInfo (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class TagLibraryInfo

java.lang.Object
    extended by javax.servlet.jsp.tagext.TagLibraryInfo
public abstract class TagLibraryInfo
extends java.lang.Object

Translation-time information associated with a taglib directive, and its underlying TLD file. Most of the information is directly from the TLD, except for the prefix and the uri values used in the taglib directive

Field Summary
protected FunctionInfo[] | functions An array describing the functions that are defined in this tag library.
protected java.lang.String | info Information (documentation) for this TLD.
protected java.lang.String | jspversion The version of the JSP specification this tag library is written to.
protected java.lang.String | prefix The prefix assigned to this taglib from the taglib directive.
protected java.lang.String | shortname The preferred short name (prefix) as indicated in the TLD.
protected TagFileInfo[] | tagFiles An array describing the tag files that are defined in this tag library.
protected TagInfo[] | tags An array describing the tags that are defined in this tag library.
protected java.lang.String | tlibversion The version of the tag library.
protected java.lang.String | uri The value of the uri attribute from the taglib directive for this library.
protected java.lang.String | urn The "reliable" URN indicated in the TLD.
Constructor Summary
protected TagLibraryInfo(java.lang.String prefix, java.lang.String uri)
Constructor.
Method Summary
FunctionInfo | getFunction(java.lang.String name) Get the FunctionInfo for a given function name, looking through all the functions in this tag library.
FunctionInfo[] | getFunctions() An array describing the functions that are defined in this tag library.
java.lang.String | getInfoString() Information (documentation) for this TLD.
java.lang.String | getPrefixString() The prefix assigned to this taglib from the taglib directive
java.lang.String | getReliableURN() The "reliable" URN indicated in the TLD (the uri element).
java.lang.String | getRequiredVersion() A string describing the required version of the JSP container.
java.lang.String | getShortName() The preferred short name (prefix) as indicated in the TLD.
TagInfo | getTag(java.lang.String shortname) Get the TagInfo for a given tag name, looking through all the tags in this tag library.
TagFileInfo | getTagFile(java.lang.String shortname) Get the TagFileInfo for a given tag name, looking through all the tag files in this tag library.
TagFileInfo[] | getTagFiles() An array describing the tag files that are defined in this tag library.
TagInfo[] | getTags() An array describing the tags that are defined in this tag library.
java.lang.String | getURI() The value of the uri attribute from the taglib directive for this library.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

prefix

protected java.lang.String prefix
The prefix assigned to this taglib from the taglib directive.

uri

protected java.lang.String uri
The value of the uri attribute from the taglib directive for this library.

tags

protected TagInfo[] tags
An array describing the tags that are defined in this tag library.

tagFiles

protected TagFileInfo[] tagFiles
An array describing the tag files that are defined in this tag library.

Since:
2.0

functions

protected FunctionInfo[] functions
An array describing the functions that are defined in this tag library.

Since:
2.0

tlibversion

protected java.lang.String tlibversion
The version of the tag library.

jspversion

protected java.lang.String jspversion
The version of the JSP specification this tag library is written to.

shortname

protected java.lang.String shortname
The preferred short name (prefix) as indicated in the TLD.

urn

protected java.lang.String urn
The "reliable" URN indicated in the TLD.

info

protected java.lang.String info
Information (documentation) for this TLD.

Constructor Detail

TagLibraryInfo

protected TagLibraryInfo(java.lang.String prefix,
                         java.lang.String uri)
Constructor. This will invoke the constructors for TagInfo, and TagAttributeInfo after parsing the TLD file.

Parameters:
prefix - the prefix actually used by the taglib directive
uri - the URI actually used by the taglib directive
Method Detail

getURI

public java.lang.String getURI()
The value of the uri attribute from the taglib directive for this library.

Returns:
the value of the uri attribute

getPrefixString

public java.lang.String getPrefixString()
The prefix assigned to this taglib from the taglib directive

Returns:
the prefix assigned to this taglib from the taglib directive

getShortName

public java.lang.String getShortName()
The preferred short name (prefix) as indicated in the TLD. This may be used by authoring tools as the preferred prefix to use when creating an taglib directive for this library.

Returns:
the preferred short name for the library

getReliableURN

public java.lang.String getReliableURN()
The "reliable" URN indicated in the TLD (the uri element). This may be used by authoring tools as a global identifier to use when creating a taglib directive for this library.

Returns:
a reliable URN to a TLD like this

getInfoString

public java.lang.String getInfoString()
Information (documentation) for this TLD.

Returns:
the info string for this tag lib

getRequiredVersion

public java.lang.String getRequiredVersion()
A string describing the required version of the JSP container.

Returns:
the (minimal) required version of the JSP container.
See Also:
JspEngineInfo

getTags

public TagInfo[] getTags()
An array describing the tags that are defined in this tag library.

Returns:
the TagInfo objects corresponding to the tags defined by this tag library, or a zero length array if this tag library defines no tags

getTagFiles

public TagFileInfo[] getTagFiles()
An array describing the tag files that are defined in this tag library.

Returns:
the TagFileInfo objects corresponding to the tag files defined by this tag library, or a zero length array if this tag library defines no tags files
Since:
2.0

getTag

public TagInfo getTag(java.lang.String shortname)
Get the TagInfo for a given tag name, looking through all the tags in this tag library.

Parameters:
shortname - The short name (no prefix) of the tag
Returns:
the TagInfo for the tag with the specified short name, or null if no such tag is found

getTagFile

public TagFileInfo getTagFile(java.lang.String shortname)
Get the TagFileInfo for a given tag name, looking through all the tag files in this tag library.

Parameters:
shortname - The short name (no prefix) of the tag
Returns:
the TagFileInfo for the specified Tag file, or null if no Tag file is found
Since:
2.0

getFunctions

public FunctionInfo[] getFunctions()
An array describing the functions that are defined in this tag library.

Returns:
the functions defined in this tag library, or a zero length array if the tag library defines no functions.
Since:
2.0

getFunction

public FunctionInfo getFunction(java.lang.String name)
Get the FunctionInfo for a given function name, looking through all the functions in this tag library.

Parameters:
name - The name (no prefix) of the function
Returns:
the FunctionInfo for the function with the given name, or null if no such function exists
Since:
2.0
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TagLibraryValidator (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class TagLibraryValidator

java.lang.Object
    extended by javax.servlet.jsp.tagext.TagLibraryValidator
public abstract class TagLibraryValidator
extends java.lang.Object

Translation-time validator class for a JSP page. A validator operates on the XML view associated with the JSP page.

The TLD file associates a TagLibraryValidator class and some init arguments with a tag library.

The JSP container is reponsible for locating an appropriate instance of the appropriate subclass by

  • new a fresh instance, or reuse an available one
  • invoke the setInitParams(Map) method on the instance
once initialized, the validate(String, String, PageData) method will be invoked, where the first two arguments are the prefix and uri for this tag library in the XML View. The prefix is intended to make it easier to produce an error message. However, it is not always accurate. In the case where a single URI is mapped to more than one prefix in the XML view, the prefix of the first URI is provided. Therefore, to provide high quality error messages in cases where the tag elements themselves are checked, the prefix parameter should be ignored and the actual prefix of the element should be used instead. TagLibraryValidators should always use the uri to identify elements as beloning to the tag library, not the prefix.

A TagLibraryValidator instance may create auxiliary objects internally to perform the validation (e.g. an XSchema validator) and may reuse it for all the pages in a given translation run.

The JSP container is not guaranteed to serialize invocations of validate() method, and TagLibraryValidators should perform any synchronization they may require.

As of JSP 2.0, a JSP container must provide a jsp:id attribute to provide higher quality validation errors. The container will track the JSP pages as passed to the container, and will assign to each element a unique "id", which is passed as the value of the jsp:id attribute. Each XML element in the XML view available will be extended with this attribute. The TagLibraryValidator can then use the attribute in one or more ValidationMessage objects. The container then, in turn, can use these values to provide more precise information on the location of an error.

The actual prefix of the id attribute may or may not be jsp but it will always map to the namespace http://java.sun.com/JSP/Page. A TagLibraryValidator implementation must rely on the uri, not the prefix, of the id attribute.

Constructor Summary
TagLibraryValidator()
Sole constructor.
Method Summary
java.util.Map | getInitParameters() Get the init parameters data as an immutable Map.
void | release() Release any data kept by this instance for validation purposes.
void | setInitParameters(java.util.Map map) Set the init data in the TLD for this validator.
ValidationMessage[] | validate(java.lang.String prefix, java.lang.String uri, PageData page) Validate a JSP page.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TagLibraryValidator

public TagLibraryValidator()
Sole constructor. (For invocation by subclass constructors, typically implicit.)

Method Detail

setInitParameters

public void setInitParameters(java.util.Map map)
Set the init data in the TLD for this validator. Parameter names are keys, and parameter values are the values.

Parameters:
map - A Map describing the init parameters

getInitParameters

public java.util.Map getInitParameters()
Get the init parameters data as an immutable Map. Parameter names are keys, and parameter values are the values.

Returns:
The init parameters as an immutable map.

validate

public ValidationMessage[] validate(java.lang.String prefix,
                                    java.lang.String uri,
                                    PageData page)
Validate a JSP page. This will get invoked once per unique tag library URI in the XML view. This method will return null if the page is valid; otherwise the method should return an array of ValidationMessage objects. An array of length zero is also interpreted as no errors.

Parameters:
prefix - the first prefix with which the tag library is associated, in the XML view. Note that some tags may use a different prefix if the namespace is redefined.
uri - the tag library's unique identifier
page - the JspData page object
Returns:
A null object, or zero length array if no errors, an array of ValidationMessages otherwise.

release

public void release()
Release any data kept by this instance for validation purposes.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TagSupport (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class TagSupport

java.lang.Object
    extended by javax.servlet.jsp.tagext.TagSupport
All Implemented Interfaces:
IterationTag, JspTag, java.io.Serializable, Tag
Direct Known Subclasses:
BodyTagSupport
public class TagSupport
extends java.lang.Object
implements IterationTag, java.io.Serializable

A base class for defining new tag handlers implementing Tag.

The TagSupport class is a utility class intended to be used as the base class for new tag handlers. The TagSupport class implements the Tag and IterationTag interfaces and adds additional convenience methods including getter methods for the properties in Tag. TagSupport has one static method that is included to facilitate coordination among cooperating tags.

Many tag handlers will extend TagSupport and only redefine a few methods.

See Also:
Serialized Form

Field Summary
protected java.lang.String | id The value of the id attribute of this tag; or null.
protected PageContext | pageContext The PageContext.
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor Summary
TagSupport()
Default constructor, all subclasses are required to define only a public constructor with the same signature, and to call the superclass constructor.
Method Summary
int | doAfterBody() Default processing for a body.
int | doEndTag() Default processing of the end tag returning EVAL_PAGE.
int | doStartTag() Default processing of the start tag, returning SKIP_BODY.
static Tag | findAncestorWithClass(Tag from, java.lang.Class klass) Find the instance of a given class type that is closest to a given instance.
java.lang.String | getId() The value of the id attribute of this tag; or null.
Tag | getParent() The Tag instance most closely enclosing this tag instance.
java.lang.Object | getValue(java.lang.String k) Get a the value associated with a key.
java.util.Enumeration | getValues() Enumerate the keys for the values kept by this tag handler.
void | release() Release state.
void | removeValue(java.lang.String k) Remove a value associated with a key.
void | setId(java.lang.String id) Set the id attribute for this tag.
void | setPageContext(PageContext pageContext) Set the page context.
void | setParent(Tag t) Set the nesting tag of this tag.
void | setValue(java.lang.String k, java.lang.Object o) Associate a value with a String key.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

id

protected java.lang.String id
The value of the id attribute of this tag; or null.

pageContext

protected PageContext pageContext
The PageContext.

Constructor Detail

TagSupport

public TagSupport()
Default constructor, all subclasses are required to define only a public constructor with the same signature, and to call the superclass constructor. This constructor is called by the code generated by the JSP translator.

Method Detail

findAncestorWithClass

public static final Tag findAncestorWithClass(Tag from,
                                              java.lang.Class klass)
Find the instance of a given class type that is closest to a given instance. This method uses the getParent method from the Tag interface. This method is used for coordination among cooperating tags.

The current version of the specification only provides one formal way of indicating the observable type of a tag handler: its tag handler implementation class, described in the tag-class subelement of the tag element. This is extended in an informal manner by allowing the tag library author to indicate in the description subelement an observable type. The type should be a subtype of the tag handler implementation class or void. This addititional constraint can be exploited by a specialized container that knows about that specific tag library, as in the case of the JSP standard tag library.

When a tag library author provides information on the observable type of a tag handler, client programmatic code should adhere to that constraint. Specifically, the Class passed to findAncestorWithClass should be a subtype of the observable type.

Parameters:
from - The instance from where to start looking.
klass - The subclass of Tag or interface to be matched
Returns:
the nearest ancestor that implements the interface or is an instance of the class specified

doStartTag

public int doStartTag()
               throws JspException
Default processing of the start tag, returning SKIP_BODY.

Specified by:
doStartTag in interface Tag
Returns:
SKIP_BODY
Throws:
JspException - if an error occurs while processing this tag
See Also:
Tag.doStartTag()

doEndTag

public int doEndTag()
             throws JspException
Default processing of the end tag returning EVAL_PAGE.

Specified by:
doEndTag in interface Tag
Returns:
EVAL_PAGE
Throws:
JspException - if an error occurs while processing this tag
See Also:
Tag.doEndTag()

doAfterBody

public int doAfterBody()
                throws JspException
Default processing for a body.

Specified by:
doAfterBody in interface IterationTag
Returns:
SKIP_BODY
Throws:
JspException - if an error occurs while processing this tag
See Also:
IterationTag.doAfterBody()

release

public void release()
Release state.

Specified by:
release in interface Tag
See Also:
Tag.release()

setParent

public void setParent(Tag t)
Set the nesting tag of this tag.

Specified by:
setParent in interface Tag
Parameters:
t - The parent Tag.
See Also:
Tag.setParent(Tag)

getParent

public Tag getParent()
The Tag instance most closely enclosing this tag instance.

Specified by:
getParent in interface Tag
Returns:
the parent tag instance or null
See Also:
Tag.getParent()

setId

public void setId(java.lang.String id)
Set the id attribute for this tag.

Parameters:
id - The String for the id.

getId

public java.lang.String getId()
The value of the id attribute of this tag; or null.

Returns:
the value of the id attribute, or null

setPageContext

public void setPageContext(PageContext pageContext)
Set the page context.

Specified by:
setPageContext in interface Tag
Parameters:
pageContext - The PageContext.
See Also:
Tag.setPageContext(javax.servlet.jsp.PageContext)

setValue

public void setValue(java.lang.String k,
                     java.lang.Object o)
Associate a value with a String key.

Parameters:
k - The key String.
o - The value to associate.

getValue

public java.lang.Object getValue(java.lang.String k)
Get a the value associated with a key.

Parameters:
k - The string key.
Returns:
The value associated with the key, or null.

removeValue

public void removeValue(java.lang.String k)
Remove a value associated with a key.

Parameters:
k - The string key.

getValues

public java.util.Enumeration getValues()
Enumerate the keys for the values kept by this tag handler.

Returns:
An enumeration of all the keys for the values set, or null or an empty Enumeration if no values have been set.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TagVariableInfo (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class TagVariableInfo

java.lang.Object
    extended by javax.servlet.jsp.tagext.TagVariableInfo
public class TagVariableInfo
extends java.lang.Object

Variable information for a tag in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time. This object should be immutable. This information is only available in JSP 1.2 format TLDs or above.

Constructor Summary
TagVariableInfo(java.lang.String nameGiven, java.lang.String nameFromAttribute, java.lang.String className, boolean declare, int scope)
Constructor for TagVariableInfo.
Method Summary
java.lang.String | getClassName() The body of the <variable-class> element.
boolean | getDeclare() The body of the <declare> element.
java.lang.String | getNameFromAttribute() The body of the <name-from-attribute> element.
java.lang.String | getNameGiven() The body of the <name-given> element.
int | getScope() The body of the <scope> element.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TagVariableInfo

public TagVariableInfo(java.lang.String nameGiven,
                       java.lang.String nameFromAttribute,
                       java.lang.String className,
                       boolean declare,
                       int scope)
Constructor for TagVariableInfo.

Parameters:
nameGiven - value of <name-given>
nameFromAttribute - value of <name-from-attribute>
className - value of <variable-class>
declare - value of <declare>
scope - value of <scope>
Method Detail

getNameGiven

public java.lang.String getNameGiven()
The body of the <name-given> element.

Returns:
The variable name as a constant

getNameFromAttribute

public java.lang.String getNameFromAttribute()
The body of the <name-from-attribute> element. This is the name of an attribute whose (translation-time) value will give the name of the variable. One of <name-given> or <name-from-attribute> is required.

Returns:
The attribute whose value defines the variable name

getClassName

public java.lang.String getClassName()
The body of the <variable-class> element.

Returns:
The name of the class of the variable or 'java.lang.String' if not defined in the TLD.

getDeclare

public boolean getDeclare()
The body of the <declare> element.

Returns:
Whether the variable is to be declared or not. If not defined in the TLD, 'true' will be returned.

getScope

public int getScope()
The body of the <scope> element.

Returns:
The scope to give the variable. NESTED scope will be returned if not defined in the TLD.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TryCatchFinally (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Interface TryCatchFinally

public interface TryCatchFinally

The auxiliary interface of a Tag, IterationTag or BodyTag tag handler that wants additional hooks for managing resources.

This interface provides two new methods: doCatch(Throwable) and doFinally(). The prototypical invocation is as follows:

 h = get a Tag();  // get a tag handler, perhaps from pool

 h.setPageContext(pc);  // initialize as desired
 h.setParent(null);
 h.setFoo("foo");

 // tag invocation protocol; see Tag.java
 try {
   doStartTag()...
   ....
   doEndTag()...
 } catch (Throwable t) {
   // react to exceptional condition
   h.doCatch(t);
 } finally {
   // restore data invariants and release per-invocation resources
   h.doFinally();
 }

 ... other invocations perhaps with some new setters
 ...
 h.release();  // release long-term resources

Method Summary
 void doCatch(java.lang.Throwable t)
Invoked if a Throwable occurs while evaluating the BODY inside a tag or in any of the following methods: Tag.doStartTag(), Tag.doEndTag(), IterationTag.doAfterBody() and BodyTag.doInitBody().
 void doFinally()
Invoked in all cases after doEndTag() for any class implementing Tag, IterationTag or BodyTag.

Method Detail

doCatch

public void doCatch(java.lang.Throwable t)
             throws java.lang.Throwable
Invoked if a Throwable occurs while evaluating the BODY inside a tag or in any of the following methods: Tag.doStartTag(), Tag.doEndTag(), IterationTag.doAfterBody() and BodyTag.doInitBody().

This method is not invoked if the Throwable occurs during one of the setter methods.

This method may throw an exception (the same or a new one) that will be propagated further up the nest chain. If an exception is thrown, doFinally() will be invoked.

This method is intended to be used to respond to an exceptional condition.

Parameters:
t - The throwable exception navigating through this tag.
Throws:
java.lang.Throwable - if the exception is to be rethrown further up the nest chain.

doFinally

public void doFinally()
Invoked in all cases after doEndTag() for any class implementing Tag, IterationTag or BodyTag. This method is invoked even if an exception has occurred in the BODY of the tag, or in any of the following methods: Tag.doStartTag(), Tag.doEndTag(), IterationTag.doAfterBody() and BodyTag.doInitBody().

This method is not invoked if the Throwable occurs during one of the setter methods.

This method should not throw an Exception.

This method is intended to maintain per-invocation data integrity and resource management actions.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ValidationMessage (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class ValidationMessage

java.lang.Object
    extended by javax.servlet.jsp.tagext.ValidationMessage
public class ValidationMessage
extends java.lang.Object

A validation message from either TagLibraryValidator or TagExtraInfo.

As of JSP 2.0, a JSP container must support a jsp:id attribute to provide higher quality validation errors. The container will track the JSP pages as passed to the container, and will assign to each element a unique "id", which is passed as the value of the jsp:id attribute. Each XML element in the XML view available will be extended with this attribute. The TagLibraryValidator can then use the attribute in one or more ValidationMessage objects. The container then, in turn, can use these values to provide more precise information on the location of an error.

The actual prefix of the id attribute may or may not be jsp but it will always map to the namespace http://java.sun.com/JSP/Page. A TagLibraryValidator implementation must rely on the uri, not the prefix, of the id attribute.

Constructor Summary
ValidationMessage(java.lang.String id, java.lang.String message)
Create a ValidationMessage.
Method Summary
java.lang.String | getId() Get the jsp:id.
java.lang.String | getMessage() Get the localized validation message.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ValidationMessage

public ValidationMessage(java.lang.String id,
                         java.lang.String message)
Create a ValidationMessage. The message String should be non-null. The value of id may be null, if the message is not specific to any XML element, or if no jsp:id attributes were passed on. If non-null, the value of id must be the value of a jsp:id attribute for the PageData passed into the validate() method.

Parameters:
id - Either null, or the value of a jsp:id attribute.
message - A localized validation message.
Method Detail

getId

public java.lang.String getId()
Get the jsp:id. Null means that there is no information available.

Returns:
The jsp:id information.

getMessage

public java.lang.String getMessage()
Get the localized validation message.

Returns:
A validation message
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VariableInfo (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.tagext
Class VariableInfo

java.lang.Object
    extended by javax.servlet.jsp.tagext.VariableInfo
public class VariableInfo
extends java.lang.Object

Information on the scripting variables that are created/modified by a tag (at run-time). This information is provided by TagExtraInfo classes and it is used by the translation phase of JSP.

Scripting variables generated by a custom action have an associated scope of either AT_BEGIN, NESTED, or AT_END.

The class name (VariableInfo.getClassName) in the returned objects is used to determine the types of the scripting variables. Note that because scripting variables are assigned their values from scoped attributes which cannot be of primitive types, "boxed" types such as java.lang.Integer must be used instead of primitives.

The class name may be a Fully Qualified Class Name, or a short class name.

If a Fully Qualified Class Name is provided, it should refer to a class that should be in the CLASSPATH for the Web Application (see Servlet 2.4 specification - essentially it is WEB-INF/lib and WEB-INF/classes). Failure to be so will lead to a translation-time error.

If a short class name is given in the VariableInfo objects, then the class name must be that of a public class in the context of the import directives of the page where the custom action appears. The class must also be in the CLASSPATH for the Web Application (see Servlet 2.4 specification - essentially it is WEB-INF/lib and WEB-INF/classes). Failure to be so will lead to a translation-time error.

Usage Comments

Frequently a fully qualified class name will refer to a class that is known to the tag library and thus, delivered in the same JAR file as the tag handlers. In most other remaining cases it will refer to a class that is in the platform on which the JSP processor is built (like J2EE). Using fully qualified class names in this manner makes the usage relatively resistant to configuration errors.

A short name is usually generated by the tag library based on some attributes passed through from the custom action user (the author), and it is thus less robust: for instance a missing import directive in the referring JSP page will lead to an invalid short name class and a translation error.

Synchronization Protocol

The result of the invocation on getVariableInfo is an array of VariableInfo objects. Each such object describes a scripting variable by providing its name, its type, whether the variable is new or not, and what its scope is. Scope is best described through a picture:

NESTED, AT_BEGIN and AT_END Variable Scopes

The JSP 2.0 specification defines the interpretation of 3 values:

  • NESTED, if the scripting variable is available between the start tag and the end tag of the action that defines it.
  • AT_BEGIN, if the scripting variable is available from the start tag of the action that defines it until the end of the scope.
  • AT_END, if the scripting variable is available after the end tag of the action that defines it until the end of the scope.
The scope value for a variable implies what methods may affect its value and thus where synchronization is needed as illustrated by the table below. Note: the synchronization of the variable(s) will occur after the respective method has been called.
Variable Synchronization Points
doStartTag() doInitBody() doAfterBody() doEndTag() doTag()
Tag
         AT_BEGIN, NESTED

AT_BEGIN, AT_END
IterationTag
         AT_BEGIN, NESTED
AT_BEGIN, NESTED
 AT_BEGIN, AT_END
BodyTag
         AT_BEGIN, NESTED1
 AT_BEGIN, NESTED1
 AT_BEGIN, NESTED
 AT_BEGIN, AT_END
SimpleTag

AT_BEGIN, AT_END
1 Called after doStartTag() if EVAL_BODY_INCLUDE is returned, or after doInitBody() otherwise.

Variable Information in the TLD

Scripting variable information can also be encoded directly for most cases into the Tag Library Descriptor using the <variable> subelement of the <tag> element. See the JSP specification.

Field Summary
static int | AT_BEGIN Scope information that scripting variable is visible after start tag.
static int | AT_END Scope information that scripting variable is visible after end tag.
static int | NESTED Scope information that scripting variable is visible only within the start/end tags.
Constructor Summary
VariableInfo(java.lang.String varName, java.lang.String className, boolean declare, int scope)
Constructor These objects can be created (at translation time) by the TagExtraInfo instances.
Method Summary
java.lang.String | getClassName() Returns the type of this variable.
boolean | getDeclare() Returns whether this is a new variable.
int | getScope() Returns the lexical scope of the variable.
java.lang.String | getVarName() Returns the name of the scripting variable.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

NESTED

public static final int NESTED
Scope information that scripting variable is visible only within the start/end tags.

See Also:
Constant Field Values

AT_BEGIN

public static final int AT_BEGIN
Scope information that scripting variable is visible after start tag.

See Also:
Constant Field Values

AT_END

public static final int AT_END
Scope information that scripting variable is visible after end tag.

See Also:
Constant Field Values
Constructor Detail

VariableInfo

public VariableInfo(java.lang.String varName,
                    java.lang.String className,
                    boolean declare,
                    int scope)
Constructor These objects can be created (at translation time) by the TagExtraInfo instances.

Parameters:
varName - The name of the scripting variable
className - The type of this variable
declare - If true, it is a new variable (in some languages this will require a declaration)
scope - Indication on the lexical scope of the variable
Method Detail

getVarName

public java.lang.String getVarName()
Returns the name of the scripting variable.

Returns:
the name of the scripting variable

getClassName

public java.lang.String getClassName()
Returns the type of this variable.

Returns:
the type of this variable

getDeclare

public boolean getDeclare()
Returns whether this is a new variable. If so, in some languages this will require a declaration.

Returns:
whether this is a new variable.

getScope

public int getScope()
Returns the lexical scope of the variable.

Returns:
the lexical scope of the variable, either AT_BEGIN, AT_END, or NESTED.
See Also:
AT_BEGIN, AT_END, NESTED
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


VariableResolver (JavaServer Pages API Documentation)

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

javax.servlet.jsp.el
Interface VariableResolver

public interface VariableResolver

This class is used to customize the way an ExpressionEvaluator resolves variable references at evaluation time. For example, instances of this class can implement their own variable lookup mechanisms, or introduce the notion of "implicit variables" which override any other variables. An instance of this class should be passed when evaluating an expression.

An instance of this class includes the context against which resolution will happen

Since:
2.0

Method Summary
 java.lang.Object resolveVariable(java.lang.String pName)
Resolves the specified variable.

Method Detail

resolveVariable

public java.lang.Object resolveVariable(java.lang.String pName)
                                 throws ELException
Resolves the specified variable. Returns null if the variable is not found.

Parameters:
pName - the name of the variable to resolve
Returns:
the result of the variable resolution
Throws:
ELException - if a failure occurred while trying to resolve the given variable
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


javax.servlet.jsp (JavaServer Pages API Documentation)

 javax.servlet.jsp
Interfaces
HttpJspPage
JspPage
Classes
ErrorData
JspContext
JspEngineInfo
JspFactory
JspWriter
PageContext
Exceptions
JspException
JspTagException
SkipPageException


javax.servlet.jsp.el (JavaServer Pages API Documentation)

 javax.servlet.jsp.el
Interfaces
FunctionMapper
VariableResolver
Classes
Expression
ExpressionEvaluator
Exceptions
ELException
ELParseException


javax.servlet.jsp.tagext (JavaServer Pages API Documentation)

 javax.servlet.jsp.tagext
Interfaces
BodyTag
DynamicAttributes
IterationTag
JspTag
SimpleTag
Tag
TryCatchFinally
Classes
BodyContent
BodyTagSupport
FunctionInfo
JspFragment
PageData
SimpleTagSupport
TagAdapter
TagAttributeInfo
TagData
TagExtraInfo
TagFileInfo
TagInfo
TagLibraryInfo
TagLibraryValidator
TagSupport
TagVariableInfo
ValidationMessage
VariableInfo


About Jdoc2chm

The project files of this HTML Help
Have been generated withJDoc2CHM (Registered to:Allen Zhang) v1.2
Copyright © 2000-2003 HotWind Software ,Inc.
http://jdoc2chm.htwsoft.com/


Constant Field Values (JavaServer Pages API Documentation)

PREV NEXT FRAMES NO FRAMES

Constant Field Values

Contents
  • javax.servlet.*
javax.servlet.*

javax.servlet.jsp.JspWriter
public static final int | DEFAULT_BUFFER | -1
public static final int | NO_BUFFER | 0
public static final int | UNBOUNDED_BUFFER | -2

javax.servlet.jsp.PageContext
public static final java.lang.String | APPLICATION | "javax.servlet.jsp.jspApplication"
public static final int | APPLICATION_SCOPE | 4
public static final java.lang.String | CONFIG | "javax.servlet.jsp.jspConfig"
public static final java.lang.String | EXCEPTION | "javax.servlet.jsp.jspException"
public static final java.lang.String | OUT | "javax.servlet.jsp.jspOut"
public static final java.lang.String | PAGE | "javax.servlet.jsp.jspPage"
public static final int | PAGE_SCOPE | 1
public static final java.lang.String | PAGECONTEXT | "javax.servlet.jsp.jspPageContext"
public static final java.lang.String | REQUEST | "javax.servlet.jsp.jspRequest"
public static final int | REQUEST_SCOPE | 2
public static final java.lang.String | RESPONSE | "javax.servlet.jsp.jspResponse"
public static final java.lang.String | SESSION | "javax.servlet.jsp.jspSession"
public static final int | SESSION_SCOPE | 3

javax.servlet.jsp.tagext.BodyTag
public static final int | EVAL_BODY_BUFFERED | 2
public static final int | EVAL_BODY_TAG | 2

javax.servlet.jsp.tagext.IterationTag
public static final int EVAL_BODY_AGAIN 2

javax.servlet.jsp.tagext.Tag
public static final int | EVAL_BODY_INCLUDE | 1
public static final int | EVAL_PAGE | 6
public static final int | SKIP_BODY | 0
public static final int | SKIP_PAGE | 5

javax.servlet.jsp.tagext.TagAttributeInfo
public static final java.lang.String ID "id"

javax.servlet.jsp.tagext.TagInfo
public static final java.lang.String | BODY_CONTENT_EMPTY | "EMPTY"
public static final java.lang.String | BODY_CONTENT_JSP | "JSP"
public static final java.lang.String | BODY_CONTENT_SCRIPTLESS | "SCRIPTLESS"
public static final java.lang.String | BODY_CONTENT_TAG_DEPENDENT | "TAGDEPENDENT"

javax.servlet.jsp.tagext.VariableInfo
public static final int | AT_BEGIN | 1
public static final int | AT_END | 2
public static final int | NESTED | 0

Overview Package Class Use Tree Deprecated Index Help


Deprecated List (JavaServer Pages API Documentation)

Deprecated API

Deprecated Fields
javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_TAG
As of Java JSP API 1.2, use BodyTag.EVAL_BODY_BUFFERED or IterationTag.EVAL_BODY_AGAIN.

Overview Package Class Use Tree Deprecated Index Help


API Help (JavaServer Pages API Documentation)

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

Overview

The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

Package

Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

  • Interfaces (italic)
  • Classes
  • Exceptions
  • Errors

Class/Interface

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description

  • Nested Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary

  • Field Detail
  • Constructor Detail
  • Method Detail
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

Use

Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

Tree (Class Hierarchy)

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.

Deprecated API

The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

Index

The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

Prev/Next

These links take you to the next or previous class, interface, package, or related page.

Frames/No Frames

These links show and hide the HTML frames. All pages are available with or without frames.

Serialized Form

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

This help file applies to API documentation generated using the standard doclet.

Overview Package Class Use Tree Deprecated Index Help


JavaServer Pages API Documentation

Frame Alert

This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
Link toNon-frame version.


Index (JavaServer Pages API Documentation)

A B C D E F G H I J N O P R S T U V W _

A

APPLICATION - Static variable in class javax.servlet.jsp.PageContext
Name used to store ServletContext in PageContext name table.
APPLICATION_SCOPE - Static variable in class javax.servlet.jsp.PageContext
Application scope: named reference remains available in the ServletContext until it is reclaimed.
AT_BEGIN - Static variable in class javax.servlet.jsp.tagext.VariableInfo
Scope information that scripting variable is visible after start tag.
AT_END - Static variable in class javax.servlet.jsp.tagext.VariableInfo
Scope information that scripting variable is visible after end tag.
autoFlush - Variable in class javax.servlet.jsp.JspWriter
Whether the JspWriter is autoflushing.

B

BODY_CONTENT_EMPTY - Static variable in class javax.servlet.jsp.tagext.TagInfo
Static constant for getBodyContent() when it is empty.
BODY_CONTENT_JSP - Static variable in class javax.servlet.jsp.tagext.TagInfo
Static constant for getBodyContent() when it is JSP.
BODY_CONTENT_SCRIPTLESS - Static variable in class javax.servlet.jsp.tagext.TagInfo
Static constant for getBodyContent() when it is scriptless.
BODY_CONTENT_TAG_DEPENDENT - Static variable in class javax.servlet.jsp.tagext.TagInfo
Static constant for getBodyContent() when it is Tag dependent.
BodyContent - class javax.servlet.jsp.tagext.BodyContent.
An encapsulation of the evaluation of the body of an action so it is available to a tag handler.
BodyContent(JspWriter) - Constructor for class javax.servlet.jsp.tagext.BodyContent
Protected constructor.
BodyTag - interface javax.servlet.jsp.tagext.BodyTag.
The BodyTag interface extends IterationTag by defining additional methods that let a tag handler manipulate the content of evaluating its body.
BodyTagSupport - class javax.servlet.jsp.tagext.BodyTagSupport.
A base class for defining tag handlers implementing BodyTag.
BodyTagSupport() - Constructor for class javax.servlet.jsp.tagext.BodyTagSupport
Default constructor, all subclasses are required to only define a public constructor with the same signature, and to call the superclass constructor.
bodyContent - Variable in class javax.servlet.jsp.tagext.BodyTagSupport
The current BodyContent for this BodyTag.
bufferSize - Variable in class javax.servlet.jsp.JspWriter
The size of the buffer used by the JspWriter.

C

CONFIG - Static variable in class javax.servlet.jsp.PageContext
Name used to store ServletConfig in PageContext name table.
canBeRequestTime() - Method in class javax.servlet.jsp.tagext.TagAttributeInfo
Whether this attribute can hold a request-time value.
clear() - Method in class javax.servlet.jsp.JspWriter
Clear the contents of the buffer.
clearBody() - Method in class javax.servlet.jsp.tagext.BodyContent
Clear the body without throwing any exceptions.
clearBuffer() - Method in class javax.servlet.jsp.JspWriter
Clears the current contents of the buffer.
close() - Method in class javax.servlet.jsp.JspWriter
Close the stream, flushing it first.

D

DEFAULT_BUFFER - Static variable in class javax.servlet.jsp.JspWriter
Constant indicating that the Writer is buffered and is using the implementation default buffer size.
DynamicAttributes - interface javax.servlet.jsp.tagext.DynamicAttributes.
For a tag to declare that it accepts dynamic attributes, it must implement this interface.
doAfterBody() - Method in class javax.servlet.jsp.tagext.BodyTagSupport
After the body evaluation: do not reevaluate and continue with the page.
doAfterBody() - Method in interface javax.servlet.jsp.tagext.IterationTag
Process body (re)evaluation.
doAfterBody() - Method in class javax.servlet.jsp.tagext.TagSupport
Default processing for a body.
doCatch(Throwable) - Method in interface javax.servlet.jsp.tagext.TryCatchFinally
Invoked if a Throwable occurs while evaluating the BODY inside a tag or in any of the following methods: Tag.doStartTag(), Tag.doEndTag(), IterationTag.doAfterBody() and BodyTag.doInitBody().
doEndTag() - Method in class javax.servlet.jsp.tagext.BodyTagSupport
Default processing of the end tag returning EVAL_PAGE.
doEndTag() - Method in interface javax.servlet.jsp.tagext.Tag
Process the end tag for this instance.
doEndTag() - Method in class javax.servlet.jsp.tagext.TagAdapter
Must not be called.
doEndTag() - Method in class javax.servlet.jsp.tagext.TagSupport
Default processing of the end tag returning EVAL_PAGE.
doFinally() - Method in interface javax.servlet.jsp.tagext.TryCatchFinally
Invoked in all cases after doEndTag() for any class implementing Tag, IterationTag or BodyTag.
doInitBody() - Method in interface javax.servlet.jsp.tagext.BodyTag
Prepare for evaluation of the body.
doInitBody() - Method in class javax.servlet.jsp.tagext.BodyTagSupport
Prepare for evaluation of the body just before the first body evaluation: no action.
doStartTag() - Method in class javax.servlet.jsp.tagext.BodyTagSupport
Default processing of the start tag returning EVAL_BODY_BUFFERED.
doStartTag() - Method in interface javax.servlet.jsp.tagext.Tag
Process the start tag for this instance.
doStartTag() - Method in class javax.servlet.jsp.tagext.TagAdapter
Must not be called.
doStartTag() - Method in class javax.servlet.jsp.tagext.TagSupport
Default processing of the start tag, returning SKIP_BODY.
doTag() - Method in interface javax.servlet.jsp.tagext.SimpleTag
Called by the container to invoke this tag.
doTag() - Method in class javax.servlet.jsp.tagext.SimpleTagSupport
Default processing of the tag does nothing.

E

ELException - exception javax.servlet.jsp.el.ELException.
Represents any of the exception conditions that arise during the operation evaluation of the evaluator.
ELException() - Constructor for class javax.servlet.jsp.el.ELException
Creates an ELException with no detail message.
ELException(String) - Constructor for class javax.servlet.jsp.el.ELException
Creates an ELException with the provided detail message.
ELException(Throwable) - Constructor for class javax.servlet.jsp.el.ELException
Creates an ELException with the given root cause.
ELException(String, Throwable) - Constructor for class javax.servlet.jsp.el.ELException
Creates an ELException with the given detail message and root cause.
ELParseException - exception javax.servlet.jsp.el.ELParseException.
Represents a parsing error encountered while parsing an EL expression.
ELParseException() - Constructor for class javax.servlet.jsp.el.ELParseException
Creates an ELParseException with no detail message.
ELParseException(String) - Constructor for class javax.servlet.jsp.el.ELParseException
Creates an ELParseException with the provided detail message.
EVAL_BODY_AGAIN - Static variable in interface javax.servlet.jsp.tagext.IterationTag
Request the reevaluation of some body.
EVAL_BODY_BUFFERED - Static variable in interface javax.servlet.jsp.tagext.BodyTag
Request the creation of new buffer, a BodyContent on which to evaluate the body of this tag.
EVAL_BODY_INCLUDE - Static variable in interface javax.servlet.jsp.tagext.Tag
Evaluate body into existing out stream.
EVAL_BODY_TAG - Static variable in interface javax.servlet.jsp.tagext.BodyTag
Deprecated. As of Java JSP API 1.2, use BodyTag.EVAL_BODY_BUFFERED or IterationTag.EVAL_BODY_AGAIN.
EVAL_PAGE - Static variable in interface javax.servlet.jsp.tagext.Tag
Continue evaluating the page.
EXCEPTION - Static variable in class javax.servlet.jsp.PageContext
Name used to store uncaught exception in ServletRequest attribute list and PageContext name table.
ErrorData - class javax.servlet.jsp.ErrorData.
Contains information about an error, for error pages.
ErrorData(Throwable, int, String, String) - Constructor for class javax.servlet.jsp.ErrorData
Creates a new ErrorData object.
Expression - class javax.servlet.jsp.el.Expression.
The abstract class for a prepared expression.
Expression() - Constructor for class javax.servlet.jsp.el.Expression
ExpressionEvaluator - class javax.servlet.jsp.el.ExpressionEvaluator.
The abstract base class for an expression-language evaluator.
ExpressionEvaluator() - Constructor for class javax.servlet.jsp.el.ExpressionEvaluator
evaluate(VariableResolver) - Method in class javax.servlet.jsp.el.Expression
Evaluates an expression that was previously prepared.
evaluate(String, Class, VariableResolver, FunctionMapper) - Method in class javax.servlet.jsp.el.ExpressionEvaluator
Evaluates an expression.

F

FunctionInfo - class javax.servlet.jsp.tagext.FunctionInfo.
Information for a function in a Tag Library.
FunctionInfo(String, String, String) - Constructor for class javax.servlet.jsp.tagext.FunctionInfo
Constructor for FunctionInfo.
FunctionMapper - interface javax.servlet.jsp.el.FunctionMapper.
The interface to a map between EL function names and methods.
findAncestorWithClass(JspTag, Class) - Static method in class javax.servlet.jsp.tagext.SimpleTagSupport
Find the instance of a given class type that is closest to a given instance.
findAncestorWithClass(Tag, Class) - Static method in class javax.servlet.jsp.tagext.TagSupport
Find the instance of a given class type that is closest to a given instance.
findAttribute(String) - Method in class javax.servlet.jsp.JspContext
Searches for the named attribute in page, request, session (if valid), and application scope(s) in order and returns the value associated or null.
flush() - Method in class javax.servlet.jsp.JspWriter
Flush the stream.
flush() - Method in class javax.servlet.jsp.tagext.BodyContent
Redefined flush() so it is not legal.
forward(String) - Method in class javax.servlet.jsp.PageContext
This method is used to re-direct, or "forward" the current ServletRequest and ServletResponse to another active component in the application.
functions - Variable in class javax.servlet.jsp.tagext.TagLibraryInfo
An array describing the functions that are defined in this tag library.

G

getAdaptee() - Method in class javax.servlet.jsp.tagext.TagAdapter
Gets the tag that is being adapted to the Tag interface.
getAttribute(String) - Method in class javax.servlet.jsp.JspContext
Returns the object associated with the name in the page scope or null if not found.
getAttribute(String, int) - Method in class javax.servlet.jsp.JspContext
Return the object associated with the name in the specified scope or null if not found.
getAttribute(String) - Method in class javax.servlet.jsp.tagext.TagData
The value of the attribute.
getAttributeNamesInScope(int) - Method in class javax.servlet.jsp.JspContext
Enumerate all the attributes in a given scope.
getAttributeString(String) - Method in class javax.servlet.jsp.tagext.TagData
Get the value for a given attribute.
getAttributes() - Method in class javax.servlet.jsp.tagext.TagData
Enumerates the attributes.
getAttributes() - Method in class javax.servlet.jsp.tagext.TagInfo
Attribute information (in the TLD) on this tag.
getAttributesScope(String) - Method in class javax.servlet.jsp.JspContext
Get the scope where a given attribute is defined.
getBodyContent() - Method in class javax.servlet.jsp.tagext.BodyTagSupport
Get current bodyContent.
getBodyContent() - Method in class javax.servlet.jsp.tagext.TagInfo
The bodycontent information for this tag.
getBufferSize() - Method in class javax.servlet.jsp.JspWriter
This method returns the size of the buffer used by the JspWriter.
getClassName() - Method in class javax.servlet.jsp.tagext.TagVariableInfo
The body of the <variable-class> element.
getClassName() - Method in class javax.servlet.jsp.tagext.VariableInfo
Returns the type of this variable.
getDeclare() - Method in class javax.servlet.jsp.tagext.TagVariableInfo
The body of the <declare> element.
getDeclare() - Method in class javax.servlet.jsp.tagext.VariableInfo
Returns whether this is a new variable.
getDefaultFactory() - Static method in class javax.servlet.jsp.JspFactory
Returns the default factory for this implementation.
getDisplayName() - Method in class javax.servlet.jsp.tagext.TagInfo
Get the displayName.
getEnclosingWriter() - Method in class javax.servlet.jsp.tagext.BodyContent
Get the enclosing JspWriter.
getEngineInfo() - Method in class javax.servlet.jsp.JspFactory
called to get implementation-specific information on the current JSP engine.
getErrorData() - Method in class javax.servlet.jsp.PageContext
Provides convenient access to error information.
getException() - Method in class javax.servlet.jsp.PageContext
The current value of the exception object (an Exception).
getExpressionEvaluator() - Method in class javax.servlet.jsp.JspContext
Provides programmatic access to the ExpressionEvaluator.
getFunction(String) - Method in class javax.servlet.jsp.tagext.TagLibraryInfo
Get the FunctionInfo for a given function name, looking through all the functions in this tag library.
getFunctionClass() - Method in class javax.servlet.jsp.tagext.FunctionInfo
The class of the function.
getFunctionSignature() - Method in class javax.servlet.jsp.tagext.FunctionInfo
The signature of the function.
getFunctions() - Method in class javax.servlet.jsp.tagext.TagLibraryInfo
An array describing the functions that are defined in this tag library.
getId() - Method in class javax.servlet.jsp.tagext.TagData
The value of the tag's id attribute.
getId() - Method in class javax.servlet.jsp.tagext.TagSupport
The value of the id attribute of this tag; or null.
getId() - Method in class javax.servlet.jsp.tagext.ValidationMessage
Get the jsp:id.
getIdAttribute(TagAttributeInfo[]) - Static method in class javax.servlet.jsp.tagext.TagAttributeInfo
Convenience static method that goes through an array of TagAttributeInfo objects and looks for "id".
getInfoString() - Method in class javax.servlet.jsp.tagext.TagInfo
The information string for the tag.
getInfoString() - Method in class javax.servlet.jsp.tagext.TagLibraryInfo
Information (documentation) for this TLD.
getInitParameters() - Method in class javax.servlet.jsp.tagext.TagLibraryValidator
Get the init parameters data as an immutable Map.
getInputStream() - Method in class javax.servlet.jsp.tagext.PageData
Returns an input stream on the XML view of a JSP page.
getJspBody() - Method in class javax.servlet.jsp.tagext.SimpleTagSupport
Returns the body passed in by the container via setJspBody.
getJspContext() - Method in class javax.servlet.jsp.tagext.JspFragment
Returns the JspContext that is bound to this JspFragment.
getJspContext() - Method in class javax.servlet.jsp.tagext.SimpleTagSupport
Returns the page context passed in by the container via setJspContext.
getLargeIcon() - Method in class javax.servlet.jsp.tagext.TagInfo
Get the path to the large icon.
getMessage() - Method in class javax.servlet.jsp.tagext.ValidationMessage
Get the localized validation message.
getName() - Method in class javax.servlet.jsp.tagext.FunctionInfo
The name of the function.
getName() - Method in class javax.servlet.jsp.tagext.TagAttributeInfo
The name of this attribute.
getName() - Method in class javax.servlet.jsp.tagext.TagFileInfo
The unique action name of this tag.
getNameFromAttribute() - Method in class javax.servlet.jsp.tagext.TagVariableInfo
The body of the <name-from-attribute> element.
getNameGiven() - Method in class javax.servlet.jsp.tagext.TagVariableInfo
The body of the <name-given> element.
getOut() - Method in class javax.servlet.jsp.JspContext
The current value of the out object (a JspWriter).
getPage() - Method in class javax.servlet.jsp.PageContext
The current value of the page object (In a Servlet environment, this is an instance of javax.servlet.Servlet).
getPageContext(Servlet, ServletRequest, ServletResponse, String, boolean, int, boolean) - Method in class javax.servlet.jsp.JspFactory
obtains an instance of an implementation dependent javax.servlet.jsp.PageContext abstract class for the calling Servlet and currently pending request and response.
getParent() - Method in interface javax.servlet.jsp.tagext.SimpleTag
Returns the parent of this tag, for collaboration purposes.
getParent() - Method in class javax.servlet.jsp.tagext.SimpleTagSupport
Returns the parent of this tag, for collaboration purposes.
getParent() - Method in interface javax.servlet.jsp.tagext.Tag
Get the parent (closest enclosing tag handler) for this tag handler.
getParent() - Method in class javax.servlet.jsp.tagext.TagAdapter
Returns the parent of this tag, which is always getAdaptee().getParent().
getParent() - Method in class javax.servlet.jsp.tagext.TagSupport
The Tag instance most closely enclosing this tag instance.
getPath() - Method in class javax.servlet.jsp.tagext.TagFileInfo
Where to find the .tag file implementing this action.
getPrefixString() - Method in class javax.servlet.jsp.tagext.TagLibraryInfo
The prefix assigned to this taglib from the taglib directive
getPreviousOut() - Method in class javax.servlet.jsp.tagext.BodyTagSupport
Get surrounding out JspWriter.
getReader() - Method in class javax.servlet.jsp.tagext.BodyContent
Return the value of this BodyContent as a Reader.
getReliableURN() - Method in class javax.servlet.jsp.tagext.TagLibraryInfo
The "reliable" URN indicated in the TLD (the uri element).
getRemaining() - Method in class javax.servlet.jsp.JspWriter
This method returns the number of unused bytes in the buffer.
getRequest() - Method in class javax.servlet.jsp.PageContext
The current value of the request object (a ServletRequest).
getRequestURI() - Method in class javax.servlet.jsp.ErrorData
Returns the request URI.
getRequiredVersion() - Method in class javax.servlet.jsp.tagext.TagLibraryInfo
A string describing the required version of the JSP container.
getResponse() - Method in class javax.servlet.jsp.PageContext
The current value of the response object (a ServletResponse).
getRootCause() - Method in class javax.servlet.jsp.JspException
Returns the exception that caused this JSP exception.
getRootCause() - Method in class javax.servlet.jsp.el.ELException
Returns the root cause.
getScope() - Method in class javax.servlet.jsp.tagext.TagVariableInfo
The body of the <scope> element.
getScope() - Method in class javax.servlet.jsp.tagext.VariableInfo
Returns the lexical scope of the variable.
getServletConfig() - Method in class javax.servlet.jsp.PageContext
The ServletConfig instance.
getServletContext() - Method in class javax.servlet.jsp.PageContext
The ServletContext instance.
getServletName() - Method in class javax.servlet.jsp.ErrorData
Returns the name of the servlet invoked.
getSession() - Method in class javax.servlet.jsp.PageContext
The current value of the session object (an HttpSession).
getShortName() - Method in class javax.servlet.jsp.tagext.TagLibraryInfo
The preferred short name (prefix) as indicated in the TLD.
getSmallIcon() - Method in class javax.servlet.jsp.tagext.TagInfo
Get the path to the small icon.
getSpecificationVersion() - Method in class javax.servlet.jsp.JspEngineInfo
Return the version number of the JSP specification that is supported by this JSP engine.
getStatusCode() - Method in class javax.servlet.jsp.ErrorData
Returns the status code of the error.
getString() - Method in class javax.servlet.jsp.tagext.BodyContent
Return the value of the BodyContent as a String.
getTag(String) - Method in class javax.servlet.jsp.tagext.TagLibraryInfo
Get the TagInfo for a given tag name, looking through all the tags in this tag library.
getTagClassName() - Method in class javax.servlet.jsp.tagext.TagInfo
Name of the class that provides the handler for this tag.
getTagExtraInfo() - Method in class javax.servlet.jsp.tagext.TagInfo
The instance (if any) for extra tag information.
getTagFile(String) - Method in class javax.servlet.jsp.tagext.TagLibraryInfo
Get the TagFileInfo for a given tag name, looking through all the tag files in this tag library.
getTagFiles() - Method in class javax.servlet.jsp.tagext.TagLibraryInfo
An array describing the tag files that are defined in this tag library.
getTagInfo() - Method in class javax.servlet.jsp.tagext.TagExtraInfo
Get the TagInfo for this class.
getTagInfo() - Method in class javax.servlet.jsp.tagext.TagFileInfo
Returns information about this tag, parsed from the directives in the tag file.
getTagLibrary() - Method in class javax.servlet.jsp.tagext.TagInfo
The instance of TabLibraryInfo we belong to.
getTagName() - Method in class javax.servlet.jsp.tagext.TagInfo
The name of the Tag.
getTagVariableInfos() - Method in class javax.servlet.jsp.tagext.TagInfo
Get TagVariableInfo objects associated with this TagInfo.
getTags() - Method in class javax.servlet.jsp.tagext.TagLibraryInfo
An array describing the tags that are defined in this tag library.
getThrowable() - Method in class javax.servlet.jsp.ErrorData
Returns the Throwable that caused the error.
getTypeName() - Method in class javax.servlet.jsp.tagext.TagAttributeInfo
The type (as a String) of this attribute.
getURI() - Method in class javax.servlet.jsp.tagext.TagLibraryInfo
The value of the uri attribute from the taglib directive for this library.
getValue(String) - Method in class javax.servlet.jsp.tagext.TagSupport
Get a the value associated with a key.
getValues() - Method in class javax.servlet.jsp.tagext.TagSupport
Enumerate the keys for the values kept by this tag handler.
getVarName() - Method in class javax.servlet.jsp.tagext.VariableInfo
Returns the name of the scripting variable.
getVariableInfo(TagData) - Method in class javax.servlet.jsp.tagext.TagExtraInfo
information on scripting variables defined by the tag associated with this TagExtraInfo instance.
getVariableInfo(TagData) - Method in class javax.servlet.jsp.tagext.TagInfo
Information on the scripting objects created by this tag at runtime.
getVariableResolver() - Method in class javax.servlet.jsp.JspContext
Returns an instance of a VariableResolver that provides access to the implicit objects specified in the JSP specification using this JspContext as the context object.

H

HttpJspPage - interface javax.servlet.jsp.HttpJspPage.
The HttpJspPage interface describes the interaction that a JSP Page Implementation Class must satisfy when using the HTTP protocol.
handlePageException(Exception) - Method in class javax.servlet.jsp.PageContext
This method is intended to process an unhandled 'page' level exception by forwarding the exception to the specified error page for this JSP.
handlePageException(Throwable) - Method in class javax.servlet.jsp.PageContext
This method is intended to process an unhandled 'page' level exception by forwarding the exception to the specified error page for this JSP.
hasDynamicAttributes() - Method in class javax.servlet.jsp.tagext.TagInfo
Get dynamicAttributes associated with this TagInfo.

I

ID - Static variable in class javax.servlet.jsp.tagext.TagAttributeInfo
"id" is wired in to be ID.
IterationTag - interface javax.servlet.jsp.tagext.IterationTag.
The IterationTag interface extends Tag by defining one additional method that controls the reevaluation of its body.
id - Variable in class javax.servlet.jsp.tagext.TagSupport
The value of the id attribute of this tag; or null.
include(String) - Method in class javax.servlet.jsp.PageContext
Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread.
include(String, boolean) - Method in class javax.servlet.jsp.PageContext
Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread.
info - Variable in class javax.servlet.jsp.tagext.TagLibraryInfo
Information (documentation) for this TLD.
initialize(Servlet, ServletRequest, ServletResponse, String, boolean, int, boolean) - Method in class javax.servlet.jsp.PageContext
The initialize method is called to initialize an uninitialized PageContext so that it may be used by a JSP Implementation class to service an incoming request and response within it's _jspService() method.
invoke(Writer) - Method in class javax.servlet.jsp.tagext.JspFragment
Executes the fragment and directs all output to the given Writer, or the JspWriter returned by the getOut() method of the JspContext associated with the fragment if out is null.
isAutoFlush() - Method in class javax.servlet.jsp.JspWriter
This method indicates whether the JspWriter is autoFlushing.
isFragment() - Method in class javax.servlet.jsp.tagext.TagAttributeInfo
Whether this attribute is of type JspFragment.
isRequired() - Method in class javax.servlet.jsp.tagext.TagAttributeInfo
Whether this attribute is required.
isValid(TagData) - Method in class javax.servlet.jsp.tagext.TagExtraInfo
Translation-time validation of the attributes.
isValid(TagData) - Method in class javax.servlet.jsp.tagext.TagInfo
Translation-time validation of the attributes.

J

JspContext - class javax.servlet.jsp.JspContext.
JspContext serves as the base class for the PageContext class and abstracts all information that is not specific to servlets.
JspContext() - Constructor for class javax.servlet.jsp.JspContext
Sole constructor.
JspEngineInfo - class javax.servlet.jsp.JspEngineInfo.
The JspEngineInfo is an abstract class that provides information on the current JSP engine.
JspEngineInfo() - Constructor for class javax.servlet.jsp.JspEngineInfo
Sole constructor.
JspException - exception javax.servlet.jsp.JspException.
A generic exception known to the JSP engine; uncaught JspExceptions will result in an invocation of the errorpage machinery.
JspException() - Constructor for class javax.servlet.jsp.JspException
Construct a JspException.
JspException(String) - Constructor for class javax.servlet.jsp.JspException
Constructs a new JSP exception with the specified message.
JspException(String, Throwable) - Constructor for class javax.servlet.jsp.JspException
Constructs a new JSP exception when the JSP needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation, including a description message.
JspException(Throwable) - Constructor for class javax.servlet.jsp.JspException
Constructs a new JSP exception when the JSP needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation.
JspFactory - class javax.servlet.jsp.JspFactory.
The JspFactory is an abstract class that defines a number of factory methods available to a JSP page at runtime for the purposes of creating instances of various interfaces and classes used to support the JSP implementation.
JspFactory() - Constructor for class javax.servlet.jsp.JspFactory
Sole constructor.
JspFragment - class javax.servlet.jsp.tagext.JspFragment.
Encapsulates a portion of JSP code in an object that can be invoked as many times as needed.
JspFragment() - Constructor for class javax.servlet.jsp.tagext.JspFragment
JspPage - interface javax.servlet.jsp.JspPage.
The JspPage interface describes the generic interaction that a JSP Page Implementation class must satisfy; pages that use the HTTP protocol are described by the HttpJspPage interface.
JspTag - interface javax.servlet.jsp.tagext.JspTag.
Serves as a base class for Tag and SimpleTag.
JspTagException - exception javax.servlet.jsp.JspTagException.
Exception to be used by a Tag Handler to indicate some unrecoverable error.
JspTagException(String) - Constructor for class javax.servlet.jsp.JspTagException
Constructs a new JspTagException with the specified message.
JspTagException() - Constructor for class javax.servlet.jsp.JspTagException
Constructs a new JspTagException with no message.
JspTagException(String, Throwable) - Constructor for class javax.servlet.jsp.JspTagException
Constructs a new JspTagException when the JSP Tag needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation, including a description message.
JspTagException(Throwable) - Constructor for class javax.servlet.jsp.JspTagException
Constructs a new JSP Tag exception when the JSP Tag needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation.
JspWriter - class javax.servlet.jsp.JspWriter.
The actions and template data in a JSP page is written using the JspWriter object that is referenced by the implicit variable out which is initialized automatically using methods in the PageContext object.
JspWriter(int, boolean) - Constructor for class javax.servlet.jsp.JspWriter
Protected constructor.
javax.servlet.jsp - package javax.servlet.jsp
Classes and interfaces for the Core JSP 2.0 API.
javax.servlet.jsp.el - package javax.servlet.jsp.el
Classes and interfaces for the JSP 2.0 Expression Language API.
javax.servlet.jsp.tagext - package javax.servlet.jsp.tagext
Classes and interfaces for the definition of JavaServer Pages Tag Libraries.
jspDestroy() - Method in interface javax.servlet.jsp.JspPage
The jspDestroy() method is invoked when the JSP page is about to be destroyed.
jspInit() - Method in interface javax.servlet.jsp.JspPage
The jspInit() method is invoked when the JSP page is initialized.
jspversion - Variable in class javax.servlet.jsp.tagext.TagLibraryInfo
The version of the JSP specification this tag library is written to.

N

NESTED - Static variable in class javax.servlet.jsp.tagext.VariableInfo
Scope information that scripting variable is visible only within the start/end tags.
NO_BUFFER - Static variable in class javax.servlet.jsp.JspWriter
Constant indicating that the Writer is not buffering output.
newLine() - Method in class javax.servlet.jsp.JspWriter
Write a line separator.

O

OUT - Static variable in class javax.servlet.jsp.PageContext
Name used to store current JspWriter in PageContext name table.

P

PAGE - Static variable in class javax.servlet.jsp.PageContext
Name used to store the Servlet in this PageContext's nametables.
PAGECONTEXT - Static variable in class javax.servlet.jsp.PageContext
Name used to store this PageContext in it's own name table.
PAGE_SCOPE - Static variable in class javax.servlet.jsp.PageContext
Page scope: (this is the default) the named reference remains available in this PageContext until the return from the current Servlet.service() invocation.
PageContext - class javax.servlet.jsp.PageContext.
PageContext extends JspContext to provide useful context information for when JSP technology is used in a Servlet environment.
PageContext() - Constructor for class javax.servlet.jsp.PageContext
Sole constructor.
PageData - class javax.servlet.jsp.tagext.PageData.
Translation-time information on a JSP page.
PageData() - Constructor for class javax.servlet.jsp.tagext.PageData
Sole constructor.
pageContext - Variable in class javax.servlet.jsp.tagext.TagSupport
The PageContext.
parseExpression(String, Class, FunctionMapper) - Method in class javax.servlet.jsp.el.ExpressionEvaluator
Prepare an expression for later evaluation.
popBody() - Method in class javax.servlet.jsp.JspContext
Return the previous JspWriter "out" saved by the matching pushBody(), and update the value of the "out" attribute in the page scope attribute namespace of the JspContext.
prefix - Variable in class javax.servlet.jsp.tagext.TagLibraryInfo
The prefix assigned to this taglib from the taglib directive.
print(boolean) - Method in class javax.servlet.jsp.JspWriter
Print a boolean value.
print(char) - Method in class javax.servlet.jsp.JspWriter
Print a character.
print(int) - Method in class javax.servlet.jsp.JspWriter
Print an integer.
print(long) - Method in class javax.servlet.jsp.JspWriter
Print a long integer.
print(float) - Method in class javax.servlet.jsp.JspWriter
Print a floating-point number.
print(double) - Method in class javax.servlet.jsp.JspWriter
Print a double-precision floating-point number.
print(char[]) - Method in class javax.servlet.jsp.JspWriter
Print an array of characters.
print(String) - Method in class javax.servlet.jsp.JspWriter
Print a string.
print(Object) - Method in class javax.servlet.jsp.JspWriter
Print an object.
println() - Method in class javax.servlet.jsp.JspWriter
Terminate the current line by writing the line separator string.
println(boolean) - Method in class javax.servlet.jsp.JspWriter
Print a boolean value and then terminate the line.
println(char) - Method in class javax.servlet.jsp.JspWriter
Print a character and then terminate the line.
println(int) - Method in class javax.servlet.jsp.JspWriter
Print an integer and then terminate the line.
println(long) - Method in class javax.servlet.jsp.JspWriter
Print a long integer and then terminate the line.
println(float) - Method in class javax.servlet.jsp.JspWriter
Print a floating-point number and then terminate the line.
println(double) - Method in class javax.servlet.jsp.JspWriter
Print a double-precision floating-point number and then terminate the line.
println(char[]) - Method in class javax.servlet.jsp.JspWriter
Print an array of characters and then terminate the line.
println(String) - Method in class javax.servlet.jsp.JspWriter
Print a String and then terminate the line.
println(Object) - Method in class javax.servlet.jsp.JspWriter
Print an Object and then terminate the line.
pushBody(Writer) - Method in class javax.servlet.jsp.JspContext
Return a new JspWriter object that sends output to the provided Writer.
pushBody() - Method in class javax.servlet.jsp.PageContext
Return a new BodyContent object, save the current "out" JspWriter, and update the value of the "out" attribute in the page scope attribute namespace of the PageContext.

R

REQUEST - Static variable in class javax.servlet.jsp.PageContext
Name used to store ServletRequest in PageContext name table.
REQUEST_SCOPE - Static variable in class javax.servlet.jsp.PageContext
Request scope: the named reference remains available from the ServletRequest associated with the Servlet until the current request is completed.
REQUEST_TIME_VALUE - Static variable in class javax.servlet.jsp.tagext.TagData
Distinguished value for an attribute to indicate its value is a request-time expression (which is not yet available because TagData instances are used at translation-time).
RESPONSE - Static variable in class javax.servlet.jsp.PageContext
Name used to store ServletResponse in PageContext name table.
release() - Method in class javax.servlet.jsp.PageContext
This method shall "reset" the internal state of a PageContext, releasing all internal references, and preparing the PageContext for potential reuse by a later invocation of initialize().
release() - Method in class javax.servlet.jsp.tagext.BodyTagSupport
Release state.
release() - Method in interface javax.servlet.jsp.tagext.Tag
Called on a Tag handler to release state.
release() - Method in class javax.servlet.jsp.tagext.TagAdapter
Must not be called.
release() - Method in class javax.servlet.jsp.tagext.TagLibraryValidator
Release any data kept by this instance for validation purposes.
release() - Method in class javax.servlet.jsp.tagext.TagSupport
Release state.
releasePageContext(PageContext) - Method in class javax.servlet.jsp.JspFactory
called to release a previously allocated PageContext object.
removeAttribute(String) - Method in class javax.servlet.jsp.JspContext
Remove the object reference associated with the given name from all scopes.
removeAttribute(String, int) - Method in class javax.servlet.jsp.JspContext
Remove the object reference associated with the specified name in the given scope.
removeValue(String) - Method in class javax.servlet.jsp.tagext.TagSupport
Remove a value associated with a key.
resolveFunction(String, String) - Method in interface javax.servlet.jsp.el.FunctionMapper
Resolves the specified local name and prefix into a Java.lang.Method.
resolveVariable(String) - Method in interface javax.servlet.jsp.el.VariableResolver
Resolves the specified variable.

S

SESSION - Static variable in class javax.servlet.jsp.PageContext
Name used to store HttpSession in PageContext name table.
SESSION_SCOPE - Static variable in class javax.servlet.jsp.PageContext
Session scope (only valid if this page participates in a session): the named reference remains available from the HttpSession (if any) associated with the Servlet until the HttpSession is invalidated.
SKIP_BODY - Static variable in interface javax.servlet.jsp.tagext.Tag
Skip body evaluation.
SKIP_PAGE - Static variable in interface javax.servlet.jsp.tagext.Tag
Skip the rest of the page.
SimpleTag - interface javax.servlet.jsp.tagext.SimpleTag.
Interface for defining Simple Tag Handlers.
SimpleTagSupport - class javax.servlet.jsp.tagext.SimpleTagSupport.
A base class for defining tag handlers implementing SimpleTag.
SimpleTagSupport() - Constructor for class javax.servlet.jsp.tagext.SimpleTagSupport
Sole constructor.
SkipPageException - exception javax.servlet.jsp.SkipPageException.
Exception to indicate the calling page must cease evaluation.
SkipPageException() - Constructor for class javax.servlet.jsp.SkipPageException
Creates a SkipPageException with no message.
SkipPageException(String) - Constructor for class javax.servlet.jsp.SkipPageException
Creates a SkipPageException with the provided message.
SkipPageException(String, Throwable) - Constructor for class javax.servlet.jsp.SkipPageException
Creates a SkipPageException with the provided message and root cause.
SkipPageException(Throwable) - Constructor for class javax.servlet.jsp.SkipPageException
Creates a SkipPageException with the provided root cause.
setAttribute(String, Object) - Method in class javax.servlet.jsp.JspContext
Register the name and value specified with page scope semantics.
setAttribute(String, Object, int) - Method in class javax.servlet.jsp.JspContext
Register the name and value specified with appropriate scope semantics.
setAttribute(String, Object) - Method in class javax.servlet.jsp.tagext.TagData
Set the value of an attribute.
setBodyContent(BodyContent) - Method in interface javax.servlet.jsp.tagext.BodyTag
Set the bodyContent property.
setBodyContent(BodyContent) - Method in class javax.servlet.jsp.tagext.BodyTagSupport
Prepare for evaluation of the body: stash the bodyContent away.
setDefaultFactory(JspFactory) - Static method in class javax.servlet.jsp.JspFactory
set the default factory for this implementation.
setDynamicAttribute(String, String, Object) - Method in interface javax.servlet.jsp.tagext.DynamicAttributes
Called when a tag declared to accept dynamic attributes is passed an attribute that is not declared in the Tag Library Descriptor.
setId(String) - Method in class javax.servlet.jsp.tagext.TagSupport
Set the id attribute for this tag.
setInitParameters(Map) - Method in class javax.servlet.jsp.tagext.TagLibraryValidator
Set the init data in the TLD for this validator.
setJspBody(JspFragment) - Method in interface javax.servlet.jsp.tagext.SimpleTag
Provides the body of this tag as a JspFragment object, able to be invoked zero or more times by the tag handler.
setJspBody(JspFragment) - Method in class javax.servlet.jsp.tagext.SimpleTagSupport
Stores the provided JspFragment.
setJspContext(JspContext) - Method in interface javax.servlet.jsp.tagext.SimpleTag
Called by the container to provide this tag handler with the JspContext for this invocation.
setJspContext(JspContext) - Method in class javax.servlet.jsp.tagext.SimpleTagSupport
Stores the provided JSP context in the private jspContext field.
setPageContext(PageContext) - Method in interface javax.servlet.jsp.tagext.Tag
Set the current page context.
setPageContext(PageContext) - Method in class javax.servlet.jsp.tagext.TagAdapter
Must not be called.
setPageContext(PageContext) - Method in class javax.servlet.jsp.tagext.TagSupport
Set the page context.
setParent(JspTag) - Method in interface javax.servlet.jsp.tagext.SimpleTag
Sets the parent of this tag, for collaboration purposes.
setParent(JspTag) - Method in class javax.servlet.jsp.tagext.SimpleTagSupport
Sets the parent of this tag, for collaboration purposes.
setParent(Tag) - Method in interface javax.servlet.jsp.tagext.Tag
Set the parent (closest enclosing tag handler) of this tag handler.
setParent(Tag) - Method in class javax.servlet.jsp.tagext.TagAdapter
Must not be called.
setParent(Tag) - Method in class javax.servlet.jsp.tagext.TagSupport
Set the nesting tag of this tag.
setTagExtraInfo(TagExtraInfo) - Method in class javax.servlet.jsp.tagext.TagInfo
Set the instance for extra tag information.
setTagInfo(TagInfo) - Method in class javax.servlet.jsp.tagext.TagExtraInfo
Set the TagInfo for this class.
setTagLibrary(TagLibraryInfo) - Method in class javax.servlet.jsp.tagext.TagInfo
Set the TagLibraryInfo property.
setValue(String, Object) - Method in class javax.servlet.jsp.tagext.TagSupport
Associate a value with a String key.
shortname - Variable in class javax.servlet.jsp.tagext.TagLibraryInfo
The preferred short name (prefix) as indicated in the TLD.

T

Tag - interface javax.servlet.jsp.tagext.Tag.
The interface of a classic tag handler that does not want to manipulate its body.
TagAdapter - class javax.servlet.jsp.tagext.TagAdapter.
Wraps any SimpleTag and exposes it using a Tag interface.
TagAdapter(SimpleTag) - Constructor for class javax.servlet.jsp.tagext.TagAdapter
Creates a new TagAdapter that wraps the given SimpleTag and returns the parent tag when getParent() is called.
TagAttributeInfo - class javax.servlet.jsp.tagext.TagAttributeInfo.
Information on the attributes of a Tag, available at translation time.
TagAttributeInfo(String, boolean, String, boolean) - Constructor for class javax.servlet.jsp.tagext.TagAttributeInfo
Constructor for TagAttributeInfo.
TagAttributeInfo(String, boolean, String, boolean, boolean) - Constructor for class javax.servlet.jsp.tagext.TagAttributeInfo
JSP 2.0 Constructor for TagAttributeInfo.
TagData - class javax.servlet.jsp.tagext.TagData.
The (translation-time only) attribute/value information for a tag instance.
TagData(Object[][]) - Constructor for class javax.servlet.jsp.tagext.TagData
Constructor for TagData.
TagData(Hashtable) - Constructor for class javax.servlet.jsp.tagext.TagData
Constructor for a TagData.
TagExtraInfo - class javax.servlet.jsp.tagext.TagExtraInfo.
Optional class provided by the tag library author to describe additional translation-time information not described in the TLD.
TagExtraInfo() - Constructor for class javax.servlet.jsp.tagext.TagExtraInfo
Sole constructor.
TagFileInfo - class javax.servlet.jsp.tagext.TagFileInfo.
Tag information for a tag file in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.
TagFileInfo(String, String, TagInfo) - Constructor for class javax.servlet.jsp.tagext.TagFileInfo
Constructor for TagFileInfo from data in the JSP 2.0 format for TLD.
TagInfo - class javax.servlet.jsp.tagext.TagInfo.
Tag information for a tag in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.
TagInfo(String, String, String, String, TagLibraryInfo, TagExtraInfo, TagAttributeInfo[]) - Constructor for class javax.servlet.jsp.tagext.TagInfo
Constructor for TagInfo from data in the JSP 1.1 format for TLD.
TagInfo(String, String, String, String, TagLibraryInfo, TagExtraInfo, TagAttributeInfo[], String, String, String, TagVariableInfo[]) - Constructor for class javax.servlet.jsp.tagext.TagInfo
Constructor for TagInfo from data in the JSP 1.2 format for TLD.
TagInfo(String, String, String, String, TagLibraryInfo, TagExtraInfo, TagAttributeInfo[], String, String, String, TagVariableInfo[], boolean) - Constructor for class javax.servlet.jsp.tagext.TagInfo
Constructor for TagInfo from data in the JSP 2.0 format for TLD.
TagLibraryInfo - class javax.servlet.jsp.tagext.TagLibraryInfo.
Translation-time information associated with a taglib directive, and its underlying TLD file.
TagLibraryInfo(String, String) - Constructor for class javax.servlet.jsp.tagext.TagLibraryInfo
Constructor.
TagLibraryValidator - class javax.servlet.jsp.tagext.TagLibraryValidator.
Translation-time validator class for a JSP page.
TagLibraryValidator() - Constructor for class javax.servlet.jsp.tagext.TagLibraryValidator
Sole constructor.
TagSupport - class javax.servlet.jsp.tagext.TagSupport.
A base class for defining new tag handlers implementing Tag.
TagSupport() - Constructor for class javax.servlet.jsp.tagext.TagSupport
Default constructor, all subclasses are required to define only a public constructor with the same signature, and to call the superclass constructor.
TagVariableInfo - class javax.servlet.jsp.tagext.TagVariableInfo.
Variable information for a tag in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.
TagVariableInfo(String, String, String, boolean, int) - Constructor for class javax.servlet.jsp.tagext.TagVariableInfo
Constructor for TagVariableInfo.
TryCatchFinally - interface javax.servlet.jsp.tagext.TryCatchFinally.
The auxiliary interface of a Tag, IterationTag or BodyTag tag handler that wants additional hooks for managing resources.
tagFiles - Variable in class javax.servlet.jsp.tagext.TagLibraryInfo
An array describing the tag files that are defined in this tag library.
tags - Variable in class javax.servlet.jsp.tagext.TagLibraryInfo
An array describing the tags that are defined in this tag library.
tlibversion - Variable in class javax.servlet.jsp.tagext.TagLibraryInfo
The version of the tag library.
toString() - Method in class javax.servlet.jsp.tagext.TagAttributeInfo
Returns a String representation of this TagAttributeInfo, suitable for debugging purposes.

U

UNBOUNDED_BUFFER - Static variable in class javax.servlet.jsp.JspWriter
Constant indicating that the Writer is buffered and is unbounded; this is used in BodyContent.
uri - Variable in class javax.servlet.jsp.tagext.TagLibraryInfo
The value of the uri attribute from the taglib directive for this library.
urn - Variable in class javax.servlet.jsp.tagext.TagLibraryInfo
The "reliable" URN indicated in the TLD.

V

ValidationMessage - class javax.servlet.jsp.tagext.ValidationMessage.
A validation message from either TagLibraryValidator or TagExtraInfo.
ValidationMessage(String, String) - Constructor for class javax.servlet.jsp.tagext.ValidationMessage
Create a ValidationMessage.
VariableInfo - class javax.servlet.jsp.tagext.VariableInfo.
Information on the scripting variables that are created/modified by a tag (at run-time).
VariableInfo(String, String, boolean, int) - Constructor for class javax.servlet.jsp.tagext.VariableInfo
Constructor These objects can be created (at translation time) by the TagExtraInfo instances.
VariableResolver - interface javax.servlet.jsp.el.VariableResolver.
This class is used to customize the way an ExpressionEvaluator resolves variable references at evaluation time.
validate(TagData) - Method in class javax.servlet.jsp.tagext.TagExtraInfo
Translation-time validation of the attributes.
validate(TagData) - Method in class javax.servlet.jsp.tagext.TagInfo
Translation-time validation of the attributes.
validate(String, String, PageData) - Method in class javax.servlet.jsp.tagext.TagLibraryValidator
Validate a JSP page.

W

writeOut(Writer) - Method in class javax.servlet.jsp.tagext.BodyContent
Write the contents of this BodyContent into a Writer.

_

_jspService(HttpServletRequest, HttpServletResponse) - Method in interface javax.servlet.jsp.HttpJspPage
The _jspService()method corresponds to the body of the JSP page.
A B C D E F G H I J N O P R S T U V W _
Overview Package Class Use Tree Deprecated Index Help


Overview (JavaServer Pages API Documentation)

All Classes

Packages
javax.servlet.jsp
javax.servlet.jsp.el
javax.servlet.jsp.tagext


Overview (JavaServer Pages API Documentation)

JavaServer Pages API Documentation

Packages
javax.servlet.jsp | Classes and interfaces for the Core JSP 2.0 API.
javax.servlet.jsp.el | Classes and interfaces for the JSP 2.0 Expression Language API.
javax.servlet.jsp.tagext | Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Overview Package Class Use Tree Deprecated Index Help


Class Hierarchy (JavaServer Pages API Documentation)

Hierarchy For All Packages

Package Hierarchies:
javax.servlet.jsp, javax.servlet.jsp.el, javax.servlet.jsp.tagext

Class Hierarchy

  • class java.lang.Object
    • class javax.servlet.jsp.ErrorData
    • class javax.servlet.jsp.el.Expression
    • class javax.servlet.jsp.el.ExpressionEvaluator
    • class javax.servlet.jsp.tagext.FunctionInfo
    • class javax.servlet.jsp.JspContext
      • class javax.servlet.jsp.PageContext
    • class javax.servlet.jsp.JspEngineInfo
    • class javax.servlet.jsp.JspFactory
    • class javax.servlet.jsp.tagext.JspFragment
    • class javax.servlet.jsp.tagext.PageData
    • class javax.servlet.jsp.tagext.SimpleTagSupport (implements javax.servlet.jsp.tagext.SimpleTag)
    • class javax.servlet.jsp.tagext.TagAdapter (implements javax.servlet.jsp.tagext.Tag)
    • class javax.servlet.jsp.tagext.TagAttributeInfo
    • class javax.servlet.jsp.tagext.TagData (implements java.lang.Cloneable)
    • class javax.servlet.jsp.tagext.TagExtraInfo
    • class javax.servlet.jsp.tagext.TagFileInfo
    • class javax.servlet.jsp.tagext.TagInfo
    • class javax.servlet.jsp.tagext.TagLibraryInfo
    • class javax.servlet.jsp.tagext.TagLibraryValidator
    • class javax.servlet.jsp.tagext.TagSupport (implements javax.servlet.jsp.tagext.IterationTag, java.io.Serializable)
      • class javax.servlet.jsp.tagext.BodyTagSupport (implements javax.servlet.jsp.tagext.BodyTag)
    • class javax.servlet.jsp.tagext.TagVariableInfo
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class javax.servlet.jsp.el.ELException
          • class javax.servlet.jsp.el.ELParseException
        • class javax.servlet.jsp.JspException
          • class javax.servlet.jsp.JspTagException
          • class javax.servlet.jsp.SkipPageException
    • class javax.servlet.jsp.tagext.ValidationMessage
    • class javax.servlet.jsp.tagext.VariableInfo
    • class java.io.Writer
      • class javax.servlet.jsp.JspWriter
        • class javax.servlet.jsp.tagext.BodyContent

Interface Hierarchy

  • interface javax.servlet.jsp.tagext.DynamicAttributes
  • interface javax.servlet.jsp.el.FunctionMapper
  • interface javax.servlet.jsp.tagext.JspTag
    • interface javax.servlet.jsp.tagext.BodyTag
    • interface javax.servlet.jsp.tagext.IterationTag
      • interface javax.servlet.jsp.tagext.BodyTag
    • interface javax.servlet.jsp.tagext.SimpleTag
    • interface javax.servlet.jsp.tagext.Tag
      • interface javax.servlet.jsp.tagext.BodyTag
      • interface javax.servlet.jsp.tagext.IterationTag
        • interface javax.servlet.jsp.tagext.BodyTag
  • interface javax.servlet.Servlet
    • interface javax.servlet.jsp.HttpJspPage
    • interface javax.servlet.jsp.JspPage
      • interface javax.servlet.jsp.HttpJspPage
  • interface javax.servlet.jsp.tagext.TryCatchFinally
  • interface javax.servlet.jsp.el.VariableResolver
Overview Package Class Use Tree Deprecated Index Help


(JavaServer Pages API Documentation)

The front page has been relocated.Please see:
Frame version
Non-frame version.


Serialized Form (JavaServer Pages API Documentation)

Serialized Form

Package javax.servlet.jsp

Class javax.servlet.jsp.JspException extends java.lang.Exception implements Serializable

Serialized Fields

rootCause

java.lang.Throwable rootCause

Class javax.servlet.jsp.JspTagException extends JspException implements Serializable

Class javax.servlet.jsp.SkipPageException extends JspException implements Serializable

Package javax.servlet.jsp.el

Class javax.servlet.jsp.el.ELException extends java.lang.Exception implements Serializable

Serialized Fields

mRootCause

java.lang.Throwable mRootCause

Class javax.servlet.jsp.el.ELParseException extends ELException implements Serializable

Package javax.servlet.jsp.tagext

Class javax.servlet.jsp.tagext.BodyTagSupport extends TagSupport implements Serializable

Serialized Fields

bodyContent

BodyContent bodyContent
The current BodyContent for this BodyTag.

Class javax.servlet.jsp.tagext.TagSupport extends java.lang.Object implements Serializable

Serialized Fields

parent

Tag parent

values

java.util.Hashtable values

id

java.lang.String id
The value of the id attribute of this tag; or null.

pageContext

PageContext pageContext
The PageContext.

Overview Package Class Use Tree Deprecated Index Help


javax.servlet.jsp (JavaServer Pages API Documentation)

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package javax.servlet.jsp

Classes and interfaces for the Core JSP 2.0 API.

See:
Description

Interface Summary
HttpJspPage | The HttpJspPage interface describes the interaction that a JSP Page Implementation Class must satisfy when using the HTTP protocol.
JspPage | The JspPage interface describes the generic interaction that a JSP Page Implementation class must satisfy; pages that use the HTTP protocol are described by the HttpJspPage interface.

Class Summary
ErrorData | Contains information about an error, for error pages.
JspContext | JspContext serves as the base class for the PageContext class and abstracts all information that is not specific to servlets.
JspEngineInfo | The JspEngineInfo is an abstract class that provides information on the current JSP engine.
JspFactory | The JspFactory is an abstract class that defines a number of factory methods available to a JSP page at runtime for the purposes of creating instances of various interfaces and classes used to support the JSP implementation.
JspWriter | The actions and template data in a JSP page is written using the JspWriter object that is referenced by the implicit variable out which is initialized automatically using methods in the PageContext object.
PageContext | PageContext extends JspContext to provide useful context information for when JSP technology is used in a Servlet environment.

Exception Summary
JspException | A generic exception known to the JSP engine; uncaught JspExceptions will result in an invocation of the errorpage machinery.
JspTagException | Exception to be used by a Tag Handler to indicate some unrecoverable error.
SkipPageException | Exception to indicate the calling page must cease evaluation.

Package javax.servlet.jsp Description

Classes and interfaces for the Core JSP 2.0 API.

The javax.servlet.jsp package contains a number of classes and interfaces that describe and define the contracts between a JSP page implementation class and the runtime environment provided for an instance of such a class by a conforming JSP container.

Overview Package Class Use Tree Deprecated Index Help
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


javax.servlet.jsp Class Hierarchy (JavaServer Pages API Documentation)

Hierarchy For Package javax.servlet.jsp

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.servlet.jsp.ErrorData
    • class javax.servlet.jsp.JspContext
      • class javax.servlet.jsp.PageContext
    • class javax.servlet.jsp.JspEngineInfo
    • class javax.servlet.jsp.JspFactory
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class javax.servlet.jsp.JspException
          • class javax.servlet.jsp.JspTagException
          • class javax.servlet.jsp.SkipPageException
    • class java.io.Writer
      • class javax.servlet.jsp.JspWriter

Interface Hierarchy

  • interface javax.servlet.Servlet
    • interface javax.servlet.jsp.JspPage
      • interface javax.servlet.jsp.HttpJspPage
Overview Package Class Use Tree Deprecated Index Help


Uses of Package javax.servlet.jsp (JavaServer Pages API Documentation)

Uses of Package
javax.servlet.jsp

Packages that use javax.servlet.jsp
javax.servlet.jsp | Classes and interfaces for the Core JSP 2.0 API.
javax.servlet.jsp.tagext | Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Classes in javax.servlet.jsp used by javax.servlet.jsp
ErrorData
Contains information about an error, for error pages.
JspContext
JspContext serves as the base class for the PageContext class and abstracts all information that is not specific to servlets.
JspEngineInfo
The JspEngineInfo is an abstract class that provides information on the current JSP engine.
JspException
A generic exception known to the JSP engine; uncaught JspExceptions will result in an invocation of the errorpage machinery.
JspFactory
The JspFactory is an abstract class that defines a number of factory methods available to a JSP page at runtime for the purposes of creating instances of various interfaces and classes used to support the JSP implementation.
JspPage
The JspPage interface describes the generic interaction that a JSP Page Implementation class must satisfy; pages that use the HTTP protocol are described by the HttpJspPage interface.
JspWriter
The actions and template data in a JSP page is written using the JspWriter object that is referenced by the implicit variable out which is initialized automatically using methods in the PageContext object.
PageContext
PageContext extends JspContext to provide useful context information for when JSP technology is used in a Servlet environment.

Classes in javax.servlet.jsp used by javax.servlet.jsp.tagext
JspContext
JspContext serves as the base class for the PageContext class and abstracts all information that is not specific to servlets.
JspException
A generic exception known to the JSP engine; uncaught JspExceptions will result in an invocation of the errorpage machinery.
JspWriter
The actions and template data in a JSP page is written using the JspWriter object that is referenced by the implicit variable out which is initialized automatically using methods in the PageContext object.
PageContext
PageContext extends JspContext to provide useful context information for when JSP technology is used in a Servlet environment.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.ErrorData (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.ErrorData

Packages that use ErrorData
javax.servlet.jsp Classes and interfaces for the Core JSP 2.0 API.

Uses of ErrorData in javax.servlet.jsp

Methods in javax.servlet.jsp that return ErrorData
 ErrorData PageContext.getErrorData()
Provides convenient access to error information.

Overview Package Class Use Tree Deprecated Index Help


Uses of Interface javax.servlet.jsp.HttpJspPage (JavaServer Pages API Documentation)

Uses of Interface
javax.servlet.jsp.HttpJspPage

No usage of javax.servlet.jsp.HttpJspPage

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.JspContext (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.JspContext

Packages that use JspContext
javax.servlet.jsp | Classes and interfaces for the Core JSP 2.0 API.
javax.servlet.jsp.tagext | Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of JspContext in javax.servlet.jsp

Subclasses of JspContext in javax.servlet.jsp
 class PageContext
PageContext extends JspContext to provide useful context information for when JSP technology is used in a Servlet environment.

Uses of JspContext in javax.servlet.jsp.tagext

Methods in javax.servlet.jsp.tagext that return JspContext
protected JspContext | SimpleTagSupport.getJspContext() Returns the page context passed in by the container via setJspContext.
abstract JspContext | JspFragment.getJspContext() Returns the JspContext that is bound to this JspFragment.

Methods in javax.servlet.jsp.tagext with parameters of type JspContext
void | SimpleTagSupport.setJspContext(JspContext pc) Stores the provided JSP context in the private jspContext field.
void | SimpleTag.setJspContext(JspContext pc) Called by the container to provide this tag handler with the JspContext for this invocation.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.JspEngineInfo (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.JspEngineInfo

Packages that use JspEngineInfo
javax.servlet.jsp Classes and interfaces for the Core JSP 2.0 API.

Uses of JspEngineInfo in javax.servlet.jsp

Methods in javax.servlet.jsp that return JspEngineInfo
abstract  JspEngineInfo JspFactory.getEngineInfo()
called to get implementation-specific information on the current JSP engine.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.JspException (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.JspException

Packages that use JspException
javax.servlet.jsp | Classes and interfaces for the Core JSP 2.0 API.
javax.servlet.jsp.tagext | Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of JspException in javax.servlet.jsp

Subclasses of JspException in javax.servlet.jsp
class | JspTagException Exception to be used by a Tag Handler to indicate some unrecoverable error.
class | SkipPageException Exception to indicate the calling page must cease evaluation.

Uses of JspException in javax.servlet.jsp.tagext

Methods in javax.servlet.jsp.tagext that throw JspException
 int TagSupport.doStartTag()
Default processing of the start tag, returning SKIP_BODY.
 int TagSupport.doEndTag()
Default processing of the end tag returning EVAL_PAGE.
 int TagSupport.doAfterBody()
Default processing for a body.
 int TagAdapter.doStartTag()
Must not be called.
 int TagAdapter.doEndTag()
Must not be called.
 int Tag.doStartTag()
Process the start tag for this instance.
 int Tag.doEndTag()
Process the end tag for this instance.
 void SimpleTagSupport.doTag()
Default processing of the tag does nothing.
 void SimpleTag.doTag()
Called by the container to invoke this tag.
abstract  void JspFragment.invoke(java.io.Writer out)
Executes the fragment and directs all output to the given Writer, or the JspWriter returned by the getOut() method of the JspContext associated with the fragment if out is null.
 int IterationTag.doAfterBody()
Process body (re)evaluation.
 void DynamicAttributes.setDynamicAttribute(java.lang.String uri, java.lang.String localName, java.lang.Object value)
Called when a tag declared to accept dynamic attributes is passed an attribute that is not declared in the Tag Library Descriptor.
 int BodyTagSupport.doStartTag()
Default processing of the start tag returning EVAL_BODY_BUFFERED.
 int BodyTagSupport.doEndTag()
Default processing of the end tag returning EVAL_PAGE.
 void BodyTagSupport.doInitBody()
Prepare for evaluation of the body just before the first body evaluation: no action.
 int BodyTagSupport.doAfterBody()
After the body evaluation: do not reevaluate and continue with the page.
 void BodyTag.doInitBody()
Prepare for evaluation of the body.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.JspFactory (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.JspFactory

Packages that use JspFactory
javax.servlet.jsp Classes and interfaces for the Core JSP 2.0 API.

Uses of JspFactory in javax.servlet.jsp

Methods in javax.servlet.jsp that return JspFactory
static JspFactory JspFactory.getDefaultFactory()
Returns the default factory for this implementation.

Methods in javax.servlet.jsp with parameters of type JspFactory
static void JspFactory.setDefaultFactory(JspFactory deflt)
set the default factory for this implementation.

Overview Package Class Use Tree Deprecated Index Help


Uses of Interface javax.servlet.jsp.JspPage (JavaServer Pages API Documentation)

Uses of Interface
javax.servlet.jsp.JspPage

Packages that use JspPage
javax.servlet.jsp Classes and interfaces for the Core JSP 2.0 API.

Uses of JspPage in javax.servlet.jsp

Subinterfaces of JspPage in javax.servlet.jsp
 interface HttpJspPage
The HttpJspPage interface describes the interaction that a JSP Page Implementation Class must satisfy when using the HTTP protocol.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.JspTagException (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.JspTagException

No usage of javax.servlet.jsp.JspTagException

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.JspWriter (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.JspWriter

Packages that use JspWriter
javax.servlet.jsp | Classes and interfaces for the Core JSP 2.0 API.
javax.servlet.jsp.tagext | Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of JspWriter in javax.servlet.jsp

Methods in javax.servlet.jsp that return JspWriter
abstract  JspWriter JspContext.getOut()
The current value of the out object (a JspWriter).
 JspWriter JspContext.pushBody(java.io.Writer writer)
Return a new JspWriter object that sends output to the provided Writer.
 JspWriter JspContext.popBody()
Return the previous JspWriter "out" saved by the matching pushBody(), and update the value of the "out" attribute in the page scope attribute namespace of the JspContext.

Uses of JspWriter in javax.servlet.jsp.tagext

Subclasses of JspWriter in javax.servlet.jsp.tagext
 class BodyContent
An encapsulation of the evaluation of the body of an action so it is available to a tag handler.

Methods in javax.servlet.jsp.tagext that return JspWriter
JspWriter | BodyTagSupport.getPreviousOut() Get surrounding out JspWriter.
JspWriter | BodyContent.getEnclosingWriter() Get the enclosing JspWriter.

Constructors in javax.servlet.jsp.tagext with parameters of type JspWriter
BodyContent(JspWriter e)
Protected constructor.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.PageContext (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.PageContext

Packages that use PageContext
javax.servlet.jsp | Classes and interfaces for the Core JSP 2.0 API.
javax.servlet.jsp.tagext | Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of PageContext in javax.servlet.jsp

Methods in javax.servlet.jsp that return PageContext
abstract  PageContext JspFactory.getPageContext(javax.servlet.Servlet servlet, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, java.lang.String errorPageURL, boolean needsSession, int buffer, boolean autoflush)
obtains an instance of an implementation dependent javax.servlet.jsp.PageContext abstract class for the calling Servlet and currently pending request and response.

Methods in javax.servlet.jsp with parameters of type PageContext
abstract  void JspFactory.releasePageContext(PageContext pc)
called to release a previously allocated PageContext object.

Uses of PageContext in javax.servlet.jsp.tagext

Fields in javax.servlet.jsp.tagext declared as PageContext
protected  PageContext TagSupport.pageContext
The PageContext.

Methods in javax.servlet.jsp.tagext with parameters of type PageContext
void | TagSupport.setPageContext(PageContext pageContext) Set the page context.
void | TagAdapter.setPageContext(PageContext pc) Must not be called.
void | Tag.setPageContext(PageContext pc) Set the current page context.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.SkipPageException (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.SkipPageException

No usage of javax.servlet.jsp.SkipPageException

Overview Package Class Use Tree Deprecated Index Help


javax.servlet.jsp.el (JavaServer Pages API Documentation)

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package javax.servlet.jsp.el

Classes and interfaces for the JSP 2.0 Expression Language API.

See:
Description

Interface Summary
FunctionMapper | The interface to a map between EL function names and methods.
VariableResolver | This class is used to customize the way an ExpressionEvaluator resolves variable references at evaluation time.

Class Summary
Expression | The abstract class for a prepared expression.
ExpressionEvaluator | The abstract base class for an expression-language evaluator.

Exception Summary
ELException | Represents any of the exception conditions that arise during the operation evaluation of the evaluator.
ELParseException | Represents a parsing error encountered while parsing an EL expression.

Package javax.servlet.jsp.el Description

Classes and interfaces for the JSP 2.0 Expression Language API.

The JavaServer Pages(tm) (JSP) 2.0 specification provides a portable API for evaluating "EL Expressions". As of JSP 2.0, EL expressions can be placed directly in the template text of JSP pages and tag files.

This package contains a number of classes and interfaces that describe and define programmatic access to the Expression Language evaluator. This API can also be used by an implementation of JSP to evaluate the expressions, but other implementations, like open-coding into Java bytecodes, are allowed. This package is intended to have no dependencies on other portions of the JSP 2.0 specification.

Overview Package Class Use Tree Deprecated Index Help


javax.servlet.jsp.el Class Hierarchy (JavaServer Pages API Documentation)

Hierarchy For Package javax.servlet.jsp.el

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.servlet.jsp.el.Expression
    • class javax.servlet.jsp.el.ExpressionEvaluator
    • class java.lang.Throwable (implements java.io.Serializable)
      • class java.lang.Exception
        • class javax.servlet.jsp.el.ELException
          • class javax.servlet.jsp.el.ELParseException

Interface Hierarchy

  • interface javax.servlet.jsp.el.FunctionMapper
  • interface javax.servlet.jsp.el.VariableResolver


Uses of Package javax.servlet.jsp.el (JavaServer Pages API Documentation)

Uses of Package
javax.servlet.jsp.el

Packages that use javax.servlet.jsp.el
javax.servlet.jsp | Classes and interfaces for the Core JSP 2.0 API.
javax.servlet.jsp.el | Classes and interfaces for the JSP 2.0 Expression Language API.

Classes in javax.servlet.jsp.el used by javax.servlet.jsp
ExpressionEvaluator
The abstract base class for an expression-language evaluator.
VariableResolver
This class is used to customize the way an ExpressionEvaluator resolves variable references at evaluation time.

Classes in javax.servlet.jsp.el used by javax.servlet.jsp.el
ELException
Represents any of the exception conditions that arise during the operation evaluation of the evaluator.
Expression
The abstract class for a prepared expression.
FunctionMapper
The interface to a map between EL function names and methods.
VariableResolver
This class is used to customize the way an ExpressionEvaluator resolves variable references at evaluation time.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.el.ELException (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.el.ELException

Packages that use ELException
javax.servlet.jsp.el Classes and interfaces for the JSP 2.0 Expression Language API.

Uses of ELException in javax.servlet.jsp.el

Subclasses of ELException in javax.servlet.jsp.el
 class ELParseException
Represents a parsing error encountered while parsing an EL expression.

Methods in javax.servlet.jsp.el that throw ELException
java.lang.Object | VariableResolver.resolveVariable(java.lang.String pName) Resolves the specified variable.
abstract Expression | ExpressionEvaluator.parseExpression(java.lang.String expression, java.lang.Class expectedType, FunctionMapper fMapper) Prepare an expression for later evaluation.
abstract java.lang.Object | ExpressionEvaluator.evaluate(java.lang.String expression, java.lang.Class expectedType, VariableResolver vResolver, FunctionMapper fMapper) Evaluates an expression.
abstract java.lang.Object | Expression.evaluate(VariableResolver vResolver) Evaluates an expression that was previously prepared.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.el.ELParseException (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.el.ELParseException

No usage of javax.servlet.jsp.el.ELParseException

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.el.Expression (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.el.Expression

Packages that use Expression
javax.servlet.jsp.el Classes and interfaces for the JSP 2.0 Expression Language API.

Uses of Expression in javax.servlet.jsp.el

Methods in javax.servlet.jsp.el that return Expression
abstract  Expression ExpressionEvaluator.parseExpression(java.lang.String expression, java.lang.Class expectedType, FunctionMapper fMapper)
Prepare an expression for later evaluation.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.el.ExpressionEvaluator (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.el.ExpressionEvaluator

Packages that use ExpressionEvaluator
javax.servlet.jsp Classes and interfaces for the Core JSP 2.0 API.

Uses of ExpressionEvaluator in javax.servlet.jsp

Methods in javax.servlet.jsp that return ExpressionEvaluator
abstract  ExpressionEvaluator JspContext.getExpressionEvaluator()
Provides programmatic access to the ExpressionEvaluator.

Overview Package Class Use Tree Deprecated Index Help


Uses of Interface javax.servlet.jsp.el.FunctionMapper (JavaServer Pages API Documentation)

Uses of Interface
javax.servlet.jsp.el.FunctionMapper

Packages that use FunctionMapper
javax.servlet.jsp.el Classes and interfaces for the JSP 2.0 Expression Language API.

Uses of FunctionMapper in javax.servlet.jsp.el

Methods in javax.servlet.jsp.el with parameters of type FunctionMapper
abstract Expression | ExpressionEvaluator.parseExpression(java.lang.String expression, java.lang.Class expectedType, FunctionMapper fMapper) Prepare an expression for later evaluation.
abstract java.lang.Object | ExpressionEvaluator.evaluate(java.lang.String expression, java.lang.Class expectedType, VariableResolver vResolver, FunctionMapper fMapper) Evaluates an expression.

Overview Package Class Use Tree Deprecated Index Help


Uses of Interface javax.servlet.jsp.el.VariableResolver (JavaServer Pages API Documentation)

Uses of Interface
javax.servlet.jsp.el.VariableResolver

Packages that use VariableResolver
javax.servlet.jsp | Classes and interfaces for the Core JSP 2.0 API.
javax.servlet.jsp.el | Classes and interfaces for the JSP 2.0 Expression Language API.

Uses of VariableResolver in javax.servlet.jsp

Methods in javax.servlet.jsp that return VariableResolver
abstract  VariableResolver JspContext.getVariableResolver()
Returns an instance of a VariableResolver that provides access to the implicit objects specified in the JSP specification using this JspContext as the context object.

Uses of VariableResolver in javax.servlet.jsp.el

Methods in javax.servlet.jsp.el with parameters of type VariableResolver
abstract java.lang.Object | ExpressionEvaluator.evaluate(java.lang.String expression, java.lang.Class expectedType, VariableResolver vResolver, FunctionMapper fMapper) Evaluates an expression.
abstract java.lang.Object | Expression.evaluate(VariableResolver vResolver) Evaluates an expression that was previously prepared.

Overview Package Class Use Tree Deprecated Index Help


javax.servlet.jsp.tagext (JavaServer Pages API Documentation)

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package javax.servlet.jsp.tagext

Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

See:
Description

Interface Summary
BodyTag | The BodyTag interface extends IterationTag by defining additional methods that let a tag handler manipulate the content of evaluating its body.
DynamicAttributes | For a tag to declare that it accepts dynamic attributes, it must implement this interface.
IterationTag | The IterationTag interface extends Tag by defining one additional method that controls the reevaluation of its body.
JspTag | Serves as a base class for Tag and SimpleTag.
SimpleTag | Interface for defining Simple Tag Handlers.
Tag | The interface of a classic tag handler that does not want to manipulate its body.
TryCatchFinally | The auxiliary interface of a Tag, IterationTag or BodyTag tag handler that wants additional hooks for managing resources.

Class Summary
BodyContent | An encapsulation of the evaluation of the body of an action so it is available to a tag handler.
BodyTagSupport | A base class for defining tag handlers implementing BodyTag.
FunctionInfo | Information for a function in a Tag Library.
JspFragment | Encapsulates a portion of JSP code in an object that can be invoked as many times as needed.
PageData | Translation-time information on a JSP page.
SimpleTagSupport | A base class for defining tag handlers implementing SimpleTag.
TagAdapter | Wraps any SimpleTag and exposes it using a Tag interface.
TagAttributeInfo | Information on the attributes of a Tag, available at translation time.
TagData | The (translation-time only) attribute/value information for a tag instance.
TagExtraInfo | Optional class provided by the tag library author to describe additional translation-time information not described in the TLD.
TagFileInfo | Tag information for a tag file in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.
TagInfo | Tag information for a tag in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.
TagLibraryInfo | Translation-time information associated with a taglib directive, and its underlying TLD file.
TagLibraryValidator | Translation-time validator class for a JSP page.
TagSupport | A base class for defining new tag handlers implementing Tag.
TagVariableInfo | Variable information for a tag in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.
ValidationMessage | A validation message from either TagLibraryValidator or TagExtraInfo.
VariableInfo | Information on the scripting variables that are created/modified by a tag (at run-time).

Package javax.servlet.jsp.tagext Description

Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

The JavaServer Pages(tm) (JSP) 2.0 specification provides a portable mechanism for the description of tag libraries.

A JSP tag library contains

  • A Tag Library Descriptor
  • A number of Tag Files or Tag handler classes defining request-time behavior
  • Additional classes and resources used at runtime
  • Possibly some additional classes to provide extra translation information

The JSP 2.0 specification and the reference implementation both contain simple and moderately complex examples of actions defined using this mechanism. These are available at JSP's web site, at http://java.sun.com/products/jsp. Some readers may want to consult those to get a quick feel for how the mechanisms work together.

Overview Package Class Use Tree Deprecated Index Help
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


javax.servlet.jsp.tagext Class Hierarchy (JavaServer Pages API Documentation)

Hierarchy For Package javax.servlet.jsp.tagext

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class javax.servlet.jsp.tagext.FunctionInfo
    • class javax.servlet.jsp.tagext.JspFragment
    • class javax.servlet.jsp.tagext.PageData
    • class javax.servlet.jsp.tagext.SimpleTagSupport (implements javax.servlet.jsp.tagext.SimpleTag)
    • class javax.servlet.jsp.tagext.TagAdapter (implements javax.servlet.jsp.tagext.Tag)
    • class javax.servlet.jsp.tagext.TagAttributeInfo
    • class javax.servlet.jsp.tagext.TagData (implements java.lang.Cloneable)
    • class javax.servlet.jsp.tagext.TagExtraInfo
    • class javax.servlet.jsp.tagext.TagFileInfo
    • class javax.servlet.jsp.tagext.TagInfo
    • class javax.servlet.jsp.tagext.TagLibraryInfo
    • class javax.servlet.jsp.tagext.TagLibraryValidator
    • class javax.servlet.jsp.tagext.TagSupport (implements javax.servlet.jsp.tagext.IterationTag, java.io.Serializable)
      • class javax.servlet.jsp.tagext.BodyTagSupport (implements javax.servlet.jsp.tagext.BodyTag)
    • class javax.servlet.jsp.tagext.TagVariableInfo
    • class javax.servlet.jsp.tagext.ValidationMessage
    • class javax.servlet.jsp.tagext.VariableInfo
    • class java.io.Writer
      • class javax.servlet.jsp.JspWriter
        • class javax.servlet.jsp.tagext.BodyContent

Interface Hierarchy

  • interface javax.servlet.jsp.tagext.DynamicAttributes
  • interface javax.servlet.jsp.tagext.JspTag
    • interface javax.servlet.jsp.tagext.SimpleTag
    • interface javax.servlet.jsp.tagext.Tag
      • interface javax.servlet.jsp.tagext.IterationTag
        • interface javax.servlet.jsp.tagext.BodyTag
  • interface javax.servlet.jsp.tagext.TryCatchFinally
Overview Package Class Use Tree Deprecated Index Help


Uses of Package javax.servlet.jsp.tagext (JavaServer Pages API Documentation)

Uses of Package
javax.servlet.jsp.tagext

Packages that use javax.servlet.jsp.tagext
javax.servlet.jsp | Classes and interfaces for the Core JSP 2.0 API.
javax.servlet.jsp.tagext | Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Classes in javax.servlet.jsp.tagext used by javax.servlet.jsp
BodyContent
An encapsulation of the evaluation of the body of an action so it is available to a tag handler.

Classes in javax.servlet.jsp.tagext used by javax.servlet.jsp.tagext
BodyContent
An encapsulation of the evaluation of the body of an action so it is available to a tag handler.
BodyTag
The BodyTag interface extends IterationTag by defining additional methods that let a tag handler manipulate the content of evaluating its body.
FunctionInfo
Information for a function in a Tag Library.
IterationTag
The IterationTag interface extends Tag by defining one additional method that controls the reevaluation of its body.
JspFragment
Encapsulates a portion of JSP code in an object that can be invoked as many times as needed.
JspTag
Serves as a base class for Tag and SimpleTag.
PageData
Translation-time information on a JSP page.
SimpleTag
Interface for defining Simple Tag Handlers.
Tag
The interface of a classic tag handler that does not want to manipulate its body.
TagAttributeInfo
Information on the attributes of a Tag, available at translation time.
TagData
The (translation-time only) attribute/value information for a tag instance.
TagExtraInfo
Optional class provided by the tag library author to describe additional translation-time information not described in the TLD.
TagFileInfo
Tag information for a tag file in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.
TagInfo
Tag information for a tag in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.
TagLibraryInfo
Translation-time information associated with a taglib directive, and its underlying TLD file.
TagSupport
A base class for defining new tag handlers implementing Tag.
TagVariableInfo
Variable information for a tag in a Tag Library; This class is instantiated from the Tag Library Descriptor file (TLD) and is available only at translation time.
ValidationMessage
A validation message from either TagLibraryValidator or TagExtraInfo.
VariableInfo
Information on the scripting variables that are created/modified by a tag (at run-time).

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.BodyContent (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.BodyContent

Packages that use BodyContent
javax.servlet.jsp | Classes and interfaces for the Core JSP 2.0 API.
javax.servlet.jsp.tagext | Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of BodyContent in javax.servlet.jsp

Methods in javax.servlet.jsp that return BodyContent
 BodyContent PageContext.pushBody()
Return a new BodyContent object, save the current "out" JspWriter, and update the value of the "out" attribute in the page scope attribute namespace of the PageContext.

Uses of BodyContent in javax.servlet.jsp.tagext

Fields in javax.servlet.jsp.tagext declared as BodyContent
protected  BodyContent BodyTagSupport.bodyContent
The current BodyContent for this BodyTag.

Methods in javax.servlet.jsp.tagext that return BodyContent
 BodyContent BodyTagSupport.getBodyContent()
Get current bodyContent.

Methods in javax.servlet.jsp.tagext with parameters of type BodyContent
void | BodyTagSupport.setBodyContent(BodyContent b) Prepare for evaluation of the body: stash the bodyContent away.
void | BodyTag.setBodyContent(BodyContent b) Set the bodyContent property.

Overview Package Class Use Tree Deprecated Index Help


Uses of Interface javax.servlet.jsp.tagext.BodyTag (JavaServer Pages API Documentation)

Uses of Interface
javax.servlet.jsp.tagext.BodyTag

Packages that use BodyTag
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of BodyTag in javax.servlet.jsp.tagext

Classes in javax.servlet.jsp.tagext that implement BodyTag
 class BodyTagSupport
A base class for defining tag handlers implementing BodyTag.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.BodyTagSupport (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.BodyTagSupport

No usage of javax.servlet.jsp.tagext.BodyTagSupport

Overview Package Class Use Tree Deprecated Index Help


Uses of Interface javax.servlet.jsp.tagext.DynamicAttributes (JavaServer Pages API Documentation)

Uses of Interface
javax.servlet.jsp.tagext.DynamicAttributes

No usage of javax.servlet.jsp.tagext.DynamicAttributes

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.FunctionInfo (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.FunctionInfo

Packages that use FunctionInfo
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of FunctionInfo in javax.servlet.jsp.tagext

Fields in javax.servlet.jsp.tagext declared as FunctionInfo
protected  FunctionInfo[] TagLibraryInfo.functions
An array describing the functions that are defined in this tag library.

Methods in javax.servlet.jsp.tagext that return FunctionInfo
FunctionInfo[] | TagLibraryInfo.getFunctions() An array describing the functions that are defined in this tag library.
FunctionInfo | TagLibraryInfo.getFunction(java.lang.String name) Get the FunctionInfo for a given function name, looking through all the functions in this tag library.

Overview Package Class Use Tree Deprecated Index Help


Uses of Interface javax.servlet.jsp.tagext.IterationTag (JavaServer Pages API Documentation)

Uses of Interface
javax.servlet.jsp.tagext.IterationTag

Packages that use IterationTag
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of IterationTag in javax.servlet.jsp.tagext

Subinterfaces of IterationTag in javax.servlet.jsp.tagext
 interface BodyTag
The BodyTag interface extends IterationTag by defining additional methods that let a tag handler manipulate the content of evaluating its body.

Classes in javax.servlet.jsp.tagext that implement IterationTag
class | BodyTagSupport A base class for defining tag handlers implementing BodyTag.
class | TagSupport A base class for defining new tag handlers implementing Tag.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.JspFragment (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.JspFragment

Packages that use JspFragment
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of JspFragment in javax.servlet.jsp.tagext

Methods in javax.servlet.jsp.tagext that return JspFragment
protected  JspFragment SimpleTagSupport.getJspBody()
Returns the body passed in by the container via setJspBody.

Methods in javax.servlet.jsp.tagext with parameters of type JspFragment
void | SimpleTagSupport.setJspBody(JspFragment jspBody) Stores the provided JspFragment.
void | SimpleTag.setJspBody(JspFragment jspBody) Provides the body of this tag as a JspFragment object, able to be invoked zero or more times by the tag handler.

Overview Package Class Use Tree Deprecated Index Help


Uses of Interface javax.servlet.jsp.tagext.JspTag (JavaServer Pages API Documentation)

Uses of Interface
javax.servlet.jsp.tagext.JspTag

Packages that use JspTag
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of JspTag in javax.servlet.jsp.tagext

Subinterfaces of JspTag in javax.servlet.jsp.tagext
interface | BodyTag The BodyTag interface extends IterationTag by defining additional methods that let a tag handler manipulate the content of evaluating its body.
interface | IterationTag The IterationTag interface extends Tag by defining one additional method that controls the reevaluation of its body.
interface | SimpleTag Interface for defining Simple Tag Handlers.
interface | Tag The interface of a classic tag handler that does not want to manipulate its body.

Classes in javax.servlet.jsp.tagext that implement JspTag
class | BodyTagSupport A base class for defining tag handlers implementing BodyTag.
class | SimpleTagSupport A base class for defining tag handlers implementing SimpleTag.
class | TagAdapter Wraps any SimpleTag and exposes it using a Tag interface.
class | TagSupport A base class for defining new tag handlers implementing Tag.

Methods in javax.servlet.jsp.tagext that return JspTag
JspTag | TagAdapter.getAdaptee() Gets the tag that is being adapted to the Tag interface.
JspTag | SimpleTagSupport.getParent() Returns the parent of this tag, for collaboration purposes.
static JspTag | SimpleTagSupport.findAncestorWithClass(JspTag from, java.lang.Class klass) Find the instance of a given class type that is closest to a given instance.
JspTag | SimpleTag.getParent() Returns the parent of this tag, for collaboration purposes.

Methods in javax.servlet.jsp.tagext with parameters of type JspTag
void | SimpleTagSupport.setParent(JspTag parent) Sets the parent of this tag, for collaboration purposes.
static JspTag | SimpleTagSupport.findAncestorWithClass(JspTag from, java.lang.Class klass) Find the instance of a given class type that is closest to a given instance.
void | SimpleTag.setParent(JspTag parent) Sets the parent of this tag, for collaboration purposes.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.PageData (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.PageData

Packages that use PageData
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of PageData in javax.servlet.jsp.tagext

Methods in javax.servlet.jsp.tagext with parameters of type PageData
 ValidationMessage[] TagLibraryValidator.validate(java.lang.String prefix, java.lang.String uri, PageData page)
Validate a JSP page.

Overview Package Class Use Tree Deprecated Index Help


Uses of Interface javax.servlet.jsp.tagext.SimpleTag (JavaServer Pages API Documentation)

Uses of Interface
javax.servlet.jsp.tagext.SimpleTag

Packages that use SimpleTag
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of SimpleTag in javax.servlet.jsp.tagext

Classes in javax.servlet.jsp.tagext that implement SimpleTag
 class SimpleTagSupport
A base class for defining tag handlers implementing SimpleTag.

Constructors in javax.servlet.jsp.tagext with parameters of type SimpleTag
TagAdapter(SimpleTag adaptee)
Creates a new TagAdapter that wraps the given SimpleTag and returns the parent tag when getParent() is called.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.SimpleTagSupport (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.SimpleTagSupport

No usage of javax.servlet.jsp.tagext.SimpleTagSupport

Overview Package Class Use Tree Deprecated Index Help


Uses of Interface javax.servlet.jsp.tagext.Tag (JavaServer Pages API Documentation)

Uses of Interface
javax.servlet.jsp.tagext.Tag

Packages that use Tag
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of Tag in javax.servlet.jsp.tagext

Subinterfaces of Tag in javax.servlet.jsp.tagext
interface | BodyTag The BodyTag interface extends IterationTag by defining additional methods that let a tag handler manipulate the content of evaluating its body.
interface | IterationTag The IterationTag interface extends Tag by defining one additional method that controls the reevaluation of its body.

Classes in javax.servlet.jsp.tagext that implement Tag
class | BodyTagSupport A base class for defining tag handlers implementing BodyTag.
class | TagAdapter Wraps any SimpleTag and exposes it using a Tag interface.
class | TagSupport A base class for defining new tag handlers implementing Tag.

Methods in javax.servlet.jsp.tagext that return Tag
static Tag TagSupport.findAncestorWithClass(Tag from, java.lang.Class klass)
Find the instance of a given class type that is closest to a given instance.
 Tag TagSupport.getParent()
The Tag instance most closely enclosing this tag instance.
 Tag TagAdapter.getParent()
Returns the parent of this tag, which is always getAdaptee().getParent().
 Tag Tag.getParent()
Get the parent (closest enclosing tag handler) for this tag handler.

Methods in javax.servlet.jsp.tagext with parameters of type Tag
static Tag | TagSupport.findAncestorWithClass(Tag from, java.lang.Class klass) Find the instance of a given class type that is closest to a given instance.
void | TagSupport.setParent(Tag t) Set the nesting tag of this tag.
void | TagAdapter.setParent(Tag parentTag) Must not be called.
void | Tag.setParent(Tag t) Set the parent (closest enclosing tag handler) of this tag handler.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.TagAdapter (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.TagAdapter

No usage of javax.servlet.jsp.tagext.TagAdapter

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.TagAttributeInfo (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.TagAttributeInfo

Packages that use TagAttributeInfo
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of TagAttributeInfo in javax.servlet.jsp.tagext

Methods in javax.servlet.jsp.tagext that return TagAttributeInfo
TagAttributeInfo[] | TagInfo.getAttributes() Attribute information (in the TLD) on this tag.
static TagAttributeInfo | TagAttributeInfo.getIdAttribute(TagAttributeInfo[] a) Convenience static method that goes through an array of TagAttributeInfo objects and looks for "id".

Methods in javax.servlet.jsp.tagext with parameters of type TagAttributeInfo
static TagAttributeInfo TagAttributeInfo.getIdAttribute(TagAttributeInfo[] a)
Convenience static method that goes through an array of TagAttributeInfo objects and looks for "id".

Constructors in javax.servlet.jsp.tagext with parameters of type TagAttributeInfo
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodycontent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo)
Constructor for TagInfo from data in the JSP 1.1 format for TLD.
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodycontent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo, java.lang.String displayName, java.lang.String smallIcon, java.lang.String largeIcon, TagVariableInfo[] tvi)
Constructor for TagInfo from data in the JSP 1.2 format for TLD.
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodycontent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo, java.lang.String displayName, java.lang.String smallIcon, java.lang.String largeIcon, TagVariableInfo[] tvi, boolean dynamicAttributes)
Constructor for TagInfo from data in the JSP 2.0 format for TLD.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.TagData (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.TagData

Packages that use TagData
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of TagData in javax.servlet.jsp.tagext

Methods in javax.servlet.jsp.tagext with parameters of type TagData
VariableInfo[] | TagInfo.getVariableInfo(TagData data) Information on the scripting objects created by this tag at runtime.
boolean | TagInfo.isValid(TagData data) Translation-time validation of the attributes.
ValidationMessage[] | TagInfo.validate(TagData data) Translation-time validation of the attributes.
VariableInfo[] | TagExtraInfo.getVariableInfo(TagData data) information on scripting variables defined by the tag associated with this TagExtraInfo instance.
boolean | TagExtraInfo.isValid(TagData data) Translation-time validation of the attributes.
ValidationMessage[] | TagExtraInfo.validate(TagData data) Translation-time validation of the attributes.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.TagExtraInfo (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.TagExtraInfo

Packages that use TagExtraInfo
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of TagExtraInfo in javax.servlet.jsp.tagext

Methods in javax.servlet.jsp.tagext that return TagExtraInfo
 TagExtraInfo TagInfo.getTagExtraInfo()
The instance (if any) for extra tag information.

Methods in javax.servlet.jsp.tagext with parameters of type TagExtraInfo
 void TagInfo.setTagExtraInfo(TagExtraInfo tei)
Set the instance for extra tag information.

Constructors in javax.servlet.jsp.tagext with parameters of type TagExtraInfo
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodycontent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo)
Constructor for TagInfo from data in the JSP 1.1 format for TLD.
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodycontent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo, java.lang.String displayName, java.lang.String smallIcon, java.lang.String largeIcon, TagVariableInfo[] tvi)
Constructor for TagInfo from data in the JSP 1.2 format for TLD.
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodycontent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo, java.lang.String displayName, java.lang.String smallIcon, java.lang.String largeIcon, TagVariableInfo[] tvi, boolean dynamicAttributes)
Constructor for TagInfo from data in the JSP 2.0 format for TLD.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.TagFileInfo (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.TagFileInfo

Packages that use TagFileInfo
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of TagFileInfo in javax.servlet.jsp.tagext

Fields in javax.servlet.jsp.tagext declared as TagFileInfo
protected  TagFileInfo[] TagLibraryInfo.tagFiles
An array describing the tag files that are defined in this tag library.

Methods in javax.servlet.jsp.tagext that return TagFileInfo
TagFileInfo[] | TagLibraryInfo.getTagFiles() An array describing the tag files that are defined in this tag library.
TagFileInfo | TagLibraryInfo.getTagFile(java.lang.String shortname) Get the TagFileInfo for a given tag name, looking through all the tag files in this tag library.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.TagInfo (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.TagInfo

Packages that use TagInfo
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of TagInfo in javax.servlet.jsp.tagext

Fields in javax.servlet.jsp.tagext declared as TagInfo
protected  TagInfo[] TagLibraryInfo.tags
An array describing the tags that are defined in this tag library.

Methods in javax.servlet.jsp.tagext that return TagInfo
TagInfo[] | TagLibraryInfo.getTags() An array describing the tags that are defined in this tag library.
TagInfo | TagLibraryInfo.getTag(java.lang.String shortname) Get the TagInfo for a given tag name, looking through all the tags in this tag library.
TagInfo | TagFileInfo.getTagInfo() Returns information about this tag, parsed from the directives in the tag file.
TagInfo | TagExtraInfo.getTagInfo() Get the TagInfo for this class.

Methods in javax.servlet.jsp.tagext with parameters of type TagInfo
 void TagExtraInfo.setTagInfo(TagInfo tagInfo)
Set the TagInfo for this class.

Constructors in javax.servlet.jsp.tagext with parameters of type TagInfo
TagFileInfo(java.lang.String name, java.lang.String path, TagInfo tagInfo)
Constructor for TagFileInfo from data in the JSP 2.0 format for TLD.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.TagLibraryInfo (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.TagLibraryInfo

Packages that use TagLibraryInfo
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of TagLibraryInfo in javax.servlet.jsp.tagext

Methods in javax.servlet.jsp.tagext that return TagLibraryInfo
 TagLibraryInfo TagInfo.getTagLibrary()
The instance of TabLibraryInfo we belong to.

Methods in javax.servlet.jsp.tagext with parameters of type TagLibraryInfo
 void TagInfo.setTagLibrary(TagLibraryInfo tl)
Set the TagLibraryInfo property.

Constructors in javax.servlet.jsp.tagext with parameters of type TagLibraryInfo
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodycontent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo)
Constructor for TagInfo from data in the JSP 1.1 format for TLD.
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodycontent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo, java.lang.String displayName, java.lang.String smallIcon, java.lang.String largeIcon, TagVariableInfo[] tvi)
Constructor for TagInfo from data in the JSP 1.2 format for TLD.
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodycontent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo, java.lang.String displayName, java.lang.String smallIcon, java.lang.String largeIcon, TagVariableInfo[] tvi, boolean dynamicAttributes)
Constructor for TagInfo from data in the JSP 2.0 format for TLD.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.TagLibraryValidator (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.TagLibraryValidator

No usage of javax.servlet.jsp.tagext.TagLibraryValidator

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.TagSupport (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.TagSupport

Packages that use TagSupport
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of TagSupport in javax.servlet.jsp.tagext

Subclasses of TagSupport in javax.servlet.jsp.tagext
 class BodyTagSupport
A base class for defining tag handlers implementing BodyTag.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.TagVariableInfo (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.TagVariableInfo

Packages that use TagVariableInfo
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of TagVariableInfo in javax.servlet.jsp.tagext

Methods in javax.servlet.jsp.tagext that return TagVariableInfo
 TagVariableInfo[] TagInfo.getTagVariableInfos()
Get TagVariableInfo objects associated with this TagInfo.

Constructors in javax.servlet.jsp.tagext with parameters of type TagVariableInfo
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodycontent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo, java.lang.String displayName, java.lang.String smallIcon, java.lang.String largeIcon, TagVariableInfo[] tvi)
Constructor for TagInfo from data in the JSP 1.2 format for TLD.
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodycontent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo[] attributeInfo, java.lang.String displayName, java.lang.String smallIcon, java.lang.String largeIcon, TagVariableInfo[] tvi, boolean dynamicAttributes)
Constructor for TagInfo from data in the JSP 2.0 format for TLD.

Overview Package Class Use Tree Deprecated Index Help


Uses of Interface javax.servlet.jsp.tagext.TryCatchFinally (JavaServer Pages API Documentation)

Uses of Interface
javax.servlet.jsp.tagext.TryCatchFinally

No usage of javax.servlet.jsp.tagext.TryCatchFinally

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.ValidationMessage (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.ValidationMessage

Packages that use ValidationMessage
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of ValidationMessage in javax.servlet.jsp.tagext

Methods in javax.servlet.jsp.tagext that return ValidationMessage
ValidationMessage[] | TagLibraryValidator.validate(java.lang.String prefix, java.lang.String uri, PageData page) Validate a JSP page.
ValidationMessage[] | TagInfo.validate(TagData data) Translation-time validation of the attributes.
ValidationMessage[] | TagExtraInfo.validate(TagData data) Translation-time validation of the attributes.

Overview Package Class Use Tree Deprecated Index Help


Uses of Class javax.servlet.jsp.tagext.VariableInfo (JavaServer Pages API Documentation)

Uses of Class
javax.servlet.jsp.tagext.VariableInfo

Packages that use VariableInfo
javax.servlet.jsp.tagext Classes and interfaces for the definition of JavaServer Pages Tag Libraries.

Uses of VariableInfo in javax.servlet.jsp.tagext

Methods in javax.servlet.jsp.tagext that return VariableInfo
VariableInfo[] | TagInfo.getVariableInfo(TagData data) Information on the scripting objects created by this tag at runtime.
VariableInfo[] | TagExtraInfo.getVariableInfo(TagData data) information on scripting variables defined by the tag associated with this TagExtraInfo instance.

Overview Package Class Use Tree Deprecated Index Help