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 support by JSP 2.0, 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

Fields

public static final String BASIC_AUTH
public static final String CLIENT_CERT_AUTH
public static final String DIGEST_AUTH
public static final String FORM_AUTH

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, one of BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH, or a container-dependent ...

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.