Name
response
Synopsis
The response
variable is assigned a reference to an internal container-dependent
class that implements a protocol-dependent interface that extends the
javax.servlet.ServletResponse
. Since HTTP is the
only protocol support by JSP 1.2, the class always implements the
javax.servlet.http.HttpServletResponse
interface.
The method descriptions in this section include all methods from both
interfaces.
Synopsis
Variable name: |
|
EL expression |
|
Interface name: |
|
Extends: |
|
Implemented by: |
Internal container-dependent class |
JSP Page type: |
Available in both regular JSP pages and error pages |
Methods
-
public void addCookie(Cookie cookie)
Adds the specified cookie to the response.
-
public void addDateHeader(String headername, long date)
Adds a response header with the given name and date value. The date is specified in terms of milliseconds since the epoch (January 1, 1970, 00:00:00 GMT).
-
public void addHeader(String headername, String value)
Adds a response header with the specified name and value.
-
public void addIntHeader(String headername, int value)
Adds a response header with the given name and integer value.
-
public boolean containsHeader(String name)
Returns a
boolean
indicating whether the named response header has already been set.-
public String encodeRedirectURL(String url)
Encodes the specified URL for use in the
sendRedirect( )
method by including ...
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.