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

Attributename

Java type

Dynamic valueaccepted

Description

name
String

EL expression

The header name

value
String

EL expression

The header value

Example

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

Get JavaServer Pages, Second 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.