?? servletrequest.java
字號:
*
* @see #getParameter
*
*/
public String[] getParameterValues(String name);
/**
* Returns the name and version of the protocol the request uses
* in the form <i>protocol/majorVersion.minorVersion</i>, for
* example, HTTP/1.1. For HTTP servlets, the value
* returned is the same as the value of the CGI variable
* <code>SERVER_PROTOCOL</code>.
*
* @return a <code>String</code> containing the protocol
* name and version number
*
*/
public String getProtocol();
/**
* Returns the name of the scheme used to make this request,
* for example,
* <code>http</code>, <code>https</code>, or <code>ftp</code>.
* Different schemes have different rules for constructing URLs,
* as noted in RFC 1738.
*
* @return a <code>String</code> containing the name
* of the scheme used to make this request
*
*/
public String getScheme();
/**
* Returns the host name of the server that received the request.
* For HTTP servlets, same as the value of the CGI variable
* <code>SERVER_NAME</code>.
*
* @return a <code>String</code> containing the name
* of the server to which the request was sent
*/
public String getServerName();
/**
* Returns the port number on which this request was received.
* For HTTP servlets, same as the value of the CGI variable
* <code>SERVER_PORT</code>.
*
* @return an integer specifying the port number
*
*/
public int getServerPort();
/**
* Retrieves the body of the request as character data using
* a <code>BufferedReader</code>. The reader translates the character
* data according to the character encoding used on the body.
* Either this method or {@link #getReader} may be called to read the
* body, not both.
*
*
* @return a <code>BufferedReader</code>
* containing the body of the request
*
* @exception UnsupportedEncodingException if the character set encoding
* used is not supported and the
* text cannot be decoded
*
* @exception IllegalStateException if {@link #getInputStream} method
* has been called on this request
*
* @exception IOException if an input or output exception occurred
*
* @see #getInputStream
*
*/
public BufferedReader getReader() throws IOException;
/**
* Returns the Internet Protocol (IP) address of the client
* that sent the request. For HTTP servlets, same as the value of the
* CGI variable <code>REMOTE_ADDR</code>.
*
* @return a <code>String</code> containing the
* IP address of the client that sent the request
*
*/
public String getRemoteAddr();
/**
* Returns the fully qualified name of the client that sent the
* request, or the IP address of the client if the name cannot be
* determined. For HTTP servlets, same as the value of the CGI variable
* <code>REMOTE_HOST</code>.
*
* @return a <code>String</code> containing the fully qualified name
* of the client
*
*/
public String getRemoteHost();
/**
*
* Stores an attribute in this request.
* Attributes are reset between requests. This method is most
* often used in conjunction with {@link RequestDispatcher}.
*
* <p>Attribute names should follow the same conventions as
* package names. Names beginning with <code>java.*</code>,
* <code>javax.*</code>, and <code>com.sun.*</code>, are
* reserved for use by Sun Microsystems.
*
*
* @param name a <code>String</code> specifying
* the name of the attribute
*
* @param o the <code>Object</code> to be stored
*
*/
public void setAttribute(String name, Object o);
/**
*
* Removes an attribute from this request. This method is not
* generally needed as attributes only persist as long as the request
* is being handled.
*
* <p>Attribute names should follow the same conventions as
* package names. Names beginning with <code>java.*</code>,
* <code>javax.*</code>, and <code>com.sun.*</code>, are
* reserved for use by Sun Microsystems.
*
*
* @param name a <code>String</code> specifying
* the name of the attribute to remove
*
*/
public void removeAttribute(String name);
/**
*
* Returns the preferred <code>Locale</code> that the client will
* accept content in, based on the Accept-Language header.
* If the client request doesn't provide an Accept-Language header,
* this method returns the default locale for the server.
*
*
* @return the preferred <code>Locale</code> for the client
*
*/
public Locale getLocale();
/**
*
* Returns an <code>Enumeration</code> of <code>Locale</code> objects
* indicating, in decreasing order starting with the preferred locale, the
* locales that are acceptable to the client based on the Accept-Language
* header.
* If the client request doesn't provide an Accept-Language header,
* this method returns an <code>Enumeration</code> containing one
* <code>Locale</code>, the default locale for the server.
*
*
* @return an <code>Enumeration</code> of preferred
* <code>Locale</code> objects for the client
*
*/
public Enumeration getLocales();
/**
*
* Returns a boolean indicating whether this request was made using a
* secure channel, such as HTTPS.
*
*
* @return a boolean indicating if the request was made using a
* secure channel
*
*/
public boolean isSecure();
/**
*
* Returns a {@link RequestDispatcher} object that acts as a wrapper for
* the resource located at the given path.
* A <code>RequestDispatcher</code> object can be used to forward
* a request to the resource or to include the resource in a response.
* The resource can be dynamic or static.
*
* <p>The pathname specified may be relative, although it cannot extend
* outside the current servlet context. If the path begins with
* a "/" it is interpreted as relative to the current context root.
* This method returns <code>null</code> if the servlet container
* cannot return a <code>RequestDispatcher</code>.
*
* <p>The difference between this method and {@link
* ServletContext#getRequestDispatcher} is that this method can take a
* relative path.
*
* @param path a <code>String</code> specifying the pathname
* to the resource
*
* @return a <code>RequestDispatcher</code> object
* that acts as a wrapper for the resource
* at the specified path
*
* @see RequestDispatcher
* @see ServletContext#getRequestDispatcher
*
*/
public RequestDispatcher getRequestDispatcher(String path);
/**
*
* @deprecated As of Version 2.1 of the Java Servlet API,
* use {@link ServletContext#getRealPath} instead.
*
*/
public String getRealPath(String path);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -