|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cactus.extension.jsp.JspTagLifecycle.Interceptor
Abstract class for intercepting the tag lifecycle. You can override any of the methods to insert expectations about the tag's behaviour while it is being executed.
Constructor Summary | |
JspTagLifecycle.Interceptor()
|
Method Summary | |
void |
evalBody(int theIteration,
javax.servlet.jsp.tagext.BodyContent theBody)
Method called when the body of the tag would be evaluated. |
void |
skipBody()
Method called when the body of the tag would be skipped. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JspTagLifecycle.Interceptor()
Method Detail |
public void evalBody(int theIteration, javax.servlet.jsp.tagext.BodyContent theBody) throws javax.servlet.jsp.JspException, java.io.IOException
BodyTag
, you
should not write content to the
JspTestCase.out
instance variable while
the body is being evaluated. This is because the actual implicit
object out
in JSP pages gets replaced by the current
nested BodyContent
, whereas in JspTestCase
the out
variable always refers to the top level
JspWriter
. Instead, simply use the
BodyContent
parameter passed into the
evalBody()
method or
the JspWriter
retrieved by a call to
{javax.servlet.jsp.PageContext#getOut pageContext.getOut()}.
theIteration
- The number of times the body has been evaluatedtheBody
- The body content, or null if the tag isn't a
BodyTag
javax.servlet.jsp.JspException
- If thrown by a nested tag
java.io.IOException
- If an error occurs when reading or writing the
body contentpublic void skipBody()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |