Name

<jsp:doBody>

Synopsis

The <jsp:doBody> action must only be used in a tag file. It evaluates the corresponding custom action body, adding the output to the calling page’s output stream or capturing it in a variable.

Syntax

<jsp:doBody [var="var" | varReader="varReader"] 
  [scope="page|request|session|application"] />

Attributes

Attribute name

Java type

Dynamic value accepted

Description

scope
String

No

The scope for the variable.

var
String

No

The name of the variable to hold the evaluation result as a String.

varReader
String

No

The name of the variable to capture and expose the evaluation result as a java.io.Reader.

Example

<%-- Adding the evaluation result to the response --%>
<jsp:doBody/>

<%-- Capturing the evaluation result for further processing --%>
<jsp:doBody var="result" />

Get JavaServer Pages, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.