O'Reilly logo

JavaServer Pages, Second Edition by Hans Bergsten

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required