Java Reference
In-Depth Information
The
SC_SERVICE_UNAVAILABLE
Field
public static final int SC_SERVICE_UNAVAILABLE
This field represents a status code of (503), indicating that the HTTP server is temporarily
overloaded, and unable to handle the request.
The
SC_GATEWAY_TIMEOUT
Field
public static final int SC_GATEWAY_TIMEOUT
This field represents a status code of (504), indicating that the server did not receive a timely
response from the upstream server while acting as a gateway or proxy.
C
The
SC_HTTP_VERSION_NOT_SUPPORTED
Field
public static final int SC_HTTP_VERSION_NOT_SUPPORTED
This field represents a status code of (505), indicating that the server does not support or
refuses to support the HTTP version found in the request.
The
addCookie()
Method
public void addCookie(Cookie cookie)
The
addCookie()
method adds a
Cookie
to the
HttpServletResponse
object.
addCookie()
throws no exceptions and returns no value.
It has one parameter:
•
Cookie
The
containsHeader()
Method
public boolean containsHeader(java.lang.String name)
The
containsHeader()
method returns
true
if the named header exists in the response.
containsHeader()
throws no exceptions.
It has one parameter:
•
java.lang.String
It returns this value:
•
boolean
The
encodeURL()
Method
public java.lang.String encodeURL(java.lang.String url)
The
encodeURL()
method's URL encodes the passed-in string and returns it. If no changes are
necessary, then it simply returns the string.
encodeURL()
throws no exceptions.