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

## org.apache.cactus.extension.jsp
Class JspTagLifecycle.Interceptor

    java.lang.Object
      org.apache.cactus.extension.jsp.JspTagLifecycle.Interceptor

Enclosing class:
  JspTagLifecycle

public abstract static class JspTagLifecycle.Interceptor
extends java.lang.Object

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.

Since:
  Cactus 1.5

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

### JspTagLifecycle.Interceptor

    public JspTagLifecycle.Interceptor()

Method Detail

### evalBody

    public void evalBody(int theIteration,
                         javax.servlet.jsp.tagext.BodyContent theBody)
                  throws javax.servlet.jsp.JspException,
                         java.io.IOException

  Method called when the body of the tag would be evaluated. Can be used in specific test cases to perform assertions. Please note that if you're testing a `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()}.

  Parameters:
    `theIteration` - The number of times the body has been evaluated
    `theBody` - The body content, or `null` if the tag isn't a `BodyTag`
  Throws:
    `javax.servlet.jsp.JspException` - If thrown by a nested tag
    `java.io.IOException` - If an error occurs when reading or writing the body content

### skipBody

    public void skipBody()

  Method called when the body of the tag would be skipped. Can be used in specific test cases to perform assertions.

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 © 2000-2004 Apache Software Foundation. All Rights Reserved.