📄 httpservletrequest.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2_09) on Fri Sep 23 09:41:10 EDT 2005 -->
<TITLE>
HttpServletRequest (Servlet API Documentation)
</TITLE>
<META NAME="keywords" CONTENT="javax.servlet.http.HttpServletRequest interface">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="HttpServletRequest (Servlet API Documentation)";
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/HttpServletRequest.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
<A HREF="../../../javax/servlet/http/HttpServletResponse.html" title="interface in javax.servlet.http"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="HttpServletRequest.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.servlet.http</FONT>
<BR>
Interface HttpServletRequest</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../javax/servlet/ServletRequest.html" title="interface in javax.servlet">ServletRequest</A></DD>
</DL>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../javax/servlet/http/HttpServletRequestWrapper.html" title="class in javax.servlet.http">HttpServletRequestWrapper</A></DD>
</DL>
<HR>
<DL>
<DT>public interface <B>HttpServletRequest</B><DT>extends <A HREF="../../../javax/servlet/ServletRequest.html" title="interface in javax.servlet">ServletRequest</A></DL>
<P>
Extends the <A HREF="../../../javax/servlet/ServletRequest.html" title="interface in javax.servlet"><CODE>ServletRequest</CODE></A> interface
to provide request information for HTTP servlets.
<p>The servlet container creates an <code>HttpServletRequest</code>
object and passes it as an argument to the servlet's service
methods (<code>doGet</code>, <code>doPost</code>, etc).
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Version$</DD>
<DT><B>Author:</B></DT>
<DD>Various</DD>
</DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#BASIC_AUTH">BASIC_AUTH</A></B></CODE>
<BR>
String identifier for Basic authentication.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#CLIENT_CERT_AUTH">CLIENT_CERT_AUTH</A></B></CODE>
<BR>
String identifier for Client Certificate authentication.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#DIGEST_AUTH">DIGEST_AUTH</A></B></CODE>
<BR>
String identifier for Digest authentication.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#FORM_AUTH">FORM_AUTH</A></B></CODE>
<BR>
String identifier for Form authentication.</TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#getAuthType()">getAuthType</A></B>()</CODE>
<BR>
Returns the name of the authentication scheme used to protect
the servlet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#getContextPath()">getContextPath</A></B>()</CODE>
<BR>
Returns the portion of the request URI that indicates the context
of the request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../javax/servlet/http/Cookie.html" title="class in javax.servlet.http">Cookie</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#getCookies()">getCookies</A></B>()</CODE>
<BR>
Returns an array containing all of the <code>Cookie</code>
objects the client sent with this request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#getDateHeader(java.lang.String)">getDateHeader</A></B>(java.lang.String name)</CODE>
<BR>
Returns the value of the specified request header
as a <code>long</code> value that represents a
<code>Date</code> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#getHeader(java.lang.String)">getHeader</A></B>(java.lang.String name)</CODE>
<BR>
Returns the value of the specified request header
as a <code>String</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Enumeration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#getHeaderNames()">getHeaderNames</A></B>()</CODE>
<BR>
Returns an enumeration of all the header names
this request contains.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Enumeration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#getHeaders(java.lang.String)">getHeaders</A></B>(java.lang.String name)</CODE>
<BR>
Returns all the values of the specified request header
as an <code>Enumeration</code> of <code>String</code> objects.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#getIntHeader(java.lang.String)">getIntHeader</A></B>(java.lang.String name)</CODE>
<BR>
Returns the value of the specified request header
as an <code>int</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#getMethod()">getMethod</A></B>()</CODE>
<BR>
Returns the name of the HTTP method with which this
request was made, for example, GET, POST, or PUT.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#getPathInfo()">getPathInfo</A></B>()</CODE>
<BR>
Returns any extra path information associated with
the URL the client sent when it made this request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#getPathTranslated()">getPathTranslated</A></B>()</CODE>
<BR>
Returns any extra path information after the servlet name
but before the query string, and translates it to a real
path.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#getQueryString()">getQueryString</A></B>()</CODE>
<BR>
Returns the query string that is contained in the request
URL after the path.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#getRemoteUser()">getRemoteUser</A></B>()</CODE>
<BR>
Returns the login of the user making this request, if the
user has been authenticated, or <code>null</code> if the user
has not been authenticated.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/servlet/http/HttpServletRequest.html#getRequestedSessionId()">getRequestedSessionId</A></B>()</CODE>
<BR>
Returns the session ID specified by the client.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -