Name

request

Synopsis

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

Information stored as ServletRequest attributes corresponds to objects in the JSP request scope.

Synopsis

Variable name:

request

EL expression

${pageContext.request}

Interface name:

javax.servlet.http.HttpServletRequest

Extends:

javax.servlet.ServletRequest

Implemented by:

Internal container dependent class.

JSP page type:

Available in both regular JSP pages and error pages.

Methods

public Object getAttribute(String name)

Returns the value of the named attribute as an Object or null if no attribute of the given name exists.

public java.util.Enumeration getAttributeNames( )

Returns an Enumeration containing the names of the attributes available to this request. The Enumeration is empty if the request doesn’t have any attributes.

public String getAuthType( )

Returns the name of the authentication scheme used to protect the servlet, for example, BASIC or SSL, or null if the servlet isn’t protected.

public String getCharacterEncoding( )

Returns the name of the character encoding used in the body of this request or null if the request doesn’t specify ...

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.