Java Reference
In-Depth Information
The
getProtocol()
method returns a string representing the protocol and version of the
request. It is the same as the CGI variable
SERVER_PROTOCOL
.
getProtocol()
has no parame-
ters and throws no exceptions.
B
It returns this value:
•
java.lang.String
The
getRequestDispatcher()
Method
public RequestDispatcher getRequestDispatcher(java.lang.String path)
The
getRequestDispatcher()
method returns a
RequestDispatcher
object using a relative
path.
getRequestDispatcher()
throws no exceptions.
It has one parameter:
•
java.lang.String
It returns this value:
•
RequestDispatcher
The
getScheme()
Method
public java.lang.String getScheme()
The
getScheme()
method returns a string representing the scheme of the URL used in the
request. Example schemes include
http
,
https
, and
ftp
.
getScheme()
has no parameters and
throws no exceptions.
It returns this value:
•
java.lang.String
The
getServerName()
Method
public java.lang.String getServerName()
The
getServerName()
method returns a string representing the host name of the server that
received the request. It is the same as the CGI variable
SERVER_NAME
.
getServerName()
has no
parameters and throws no exceptions.
It returns this value:
•
java.lang.String
The
getServerPort()
Method
public int getServerPort()