Name

response

Synopsis

Variable Name:

response

Interface Name:

javax.servlet.http.HttpServletResponse

Extends:

javax.servlet.ServletResponse

Implemented by:

Internal container-dependent class

JSP Page Type:

Available in both regular JSP pages and error pages

Description

The response variable is assigned a reference to an internal container-dependent class that implements a protocol-dependent interface extending the javax.servlet.ServletResponse. Since HTTP is the only protocol supported by JSP 1.1, the class always implements the javax.servlet.http.HttpServletResponse interface. The method descriptions in this section include all methods from both interfaces.

Interface Declarations

public interface ServletResponse { public void flushBuffer( ) throws IOException; public int getBufferSize( ); public String getCharacterEncoding( ); public Locale getLocale( ); public ServletOutputStream getOutputStream( ) throws IOException public PrintWriter getWriter throws IOException public boolean isCommitted( ); public void reset( ); public void setBufferSize(int size); public void setContentLength(int length); public void setContentType(String type); public void setLocale(Locale locale); } public interface HttpServletResponse extends ServletResponse { public void addCookie(Cookie cookie); public void addDateHeader(String headername, long date); public void addHeader(String headername, String value); public void addIntHeader(String headername, int value); public boolean containsHeader(String ...

Get Java Server Pages 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.