Name
request
Variable name:
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
Description
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
interface. Since HTTP
is the only protocol supported by JSP 1.1, the class always
implements the
javax.servlet.http.HttpServletRequest
interface.
The method descriptions in this section include the methods from both
interfaces.
Methods
-
public Object getAttribute(String name)
Returns the value of the named attribute as an
Object
, ornull
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. TheEnumeration
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 is not protected.-
public String getCharacterEncoding()
Returns the name of the character encoding method used in the body of this request, or
null
if the request does not specify a character encoding method.-
public int getContentLength()
Returns the length, in bytes, of the request body (if it is made available by the input ...
Get JavaServer Pages Pocket Reference 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.