Name

<ora:setHeader>

Synopsis

The <ora:setHeader> action sets the specified response headers to the specified value. It must be used before the response is committed, for instance before a <jsp:include> action with the flush attribute set to true.

Syntax

<ora:setHeader name="headerName" value="headerValue" />

Attributes

Attribute name

Java type

Dynamic value accepted

Description

name
String

Yes

The header name.

value
String

Yes

The header value.

Example

<%-- 
  Set the Content-Type header to "text/plain"
--%>
<ora:setHeader name="Content-Type" value="text/plain" />

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.