|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectxecure.servlet.XecureHttpServletResponse
XecureHttpServletResponse Ŭ·¡½º.
HttpServletResponse ÀÎÅÍÆäÀ̽º¸¦ ±¸ÇöÇÑ Å¬·¡½º·Î¼ ¼¹öÀÇ response ¸¦ ¾ÏÈ£È Çϴµ¥ »ç¿ëµÈ´Ù.
doGet, doPost ÇÔ¼ö¿¡ Àü´ÞµÈ´Ù.
Field Summary | |
javax.servlet.http.HttpServletResponse |
res
¼ºí¸´ ¿£ÁøÀ¸·Î ºÎÅÍ Àü´ÞµÈ HttpServletResponse °´Ã¼ÀÌ´Ù. |
Fields inherited from interface javax.servlet.http.HttpServletResponse |
SC_ACCEPTED, SC_BAD_GATEWAY, SC_BAD_REQUEST, SC_CONFLICT, SC_CONTINUE, SC_CREATED, SC_FORBIDDEN, SC_GATEWAY_TIMEOUT, SC_GONE, SC_HTTP_VERSION_NOT_SUPPORTED, SC_INTERNAL_SERVER_ERROR, SC_LENGTH_REQUIRED, SC_METHOD_NOT_ALLOWED, SC_MOVED_PERMANENTLY, SC_MOVED_TEMPORARILY, SC_MULTIPLE_CHOICES, SC_NO_CONTENT, SC_NON_AUTHORITATIVE_INFORMATION, SC_NOT_ACCEPTABLE, SC_NOT_FOUND, SC_NOT_IMPLEMENTED, SC_NOT_MODIFIED, SC_OK, SC_PARTIAL_CONTENT, SC_PAYMENT_REQUIRED, SC_PRECONDITION_FAILED, SC_PROXY_AUTHENTICATION_REQUIRED, SC_REQUEST_ENTITY_TOO_LARGE, SC_REQUEST_TIMEOUT, SC_REQUEST_URI_TOO_LONG, SC_RESET_CONTENT, SC_SEE_OTHER, SC_SERVICE_UNAVAILABLE, SC_SWITCHING_PROTOCOLS, SC_UNAUTHORIZED, SC_UNSUPPORTED_MEDIA_TYPE, SC_USE_PROXY |
Constructor Summary | |
XecureHttpServletResponse(XecureSession xecureSession,
javax.servlet.http.HttpServletResponse res)
XecureHttpServletResponse Constructor XecureHttpServlet À̳ª XecureHttpJspPage Ŭ·¡½º¿¡¼ È£ÃâµÈ´Ù. |
Method Summary | |
void |
addCookie(javax.servlet.http.Cookie cookie)
Adds the specified cookie to the response. |
boolean |
containsHeader(java.lang.String name)
Checks whether the response message header has a field with the specified name. |
java.lang.String |
encodeRedirectUrl(java.lang.String url)
Encodes the specified URL for use in the sendRedirect method or, if encoding is not needed,
returns the URL unchanged. |
java.lang.String |
encodeRedirectURL(java.lang.String url)
|
java.lang.String |
encodeUrl(java.lang.String url)
Encodes the specified URL by including the session ID in it, or, if encoding is not needed, returns the URL unchanged. |
java.lang.String |
encodeURL(java.lang.String url)
|
java.lang.String |
getCharacterEncoding()
Returns the character set encoding used for this MIME body. |
javax.servlet.ServletOutputStream |
getOutputStream()
Response ÀÇ OutputStream °´Ã¼¸¦ ¸®ÅÏÇÑ´Ù. |
java.io.PrintWriter |
getWriter()
Response ÀÇ Writer °´Ã¼¸¦ ¸®ÅÏÇÑ´Ù. |
void |
sendError(int sc)
Sends an error response to the client using the specified status code and a default message. |
void |
sendError(int sc,
java.lang.String msg)
Sends an error response to the client using the specified status code and descriptive message. |
void |
sendRedirect(java.lang.String location)
Sends a temporary redirect response to the client using the specified redirect location URL. |
void |
setContentLength(int len)
Sets the content length for this response. |
void |
setContentType(java.lang.String type)
Sets the content type for this response. |
void |
setDateHeader(java.lang.String name,
long date)
Adds a field to the response header with the given name and date-valued field. |
void |
setHeader(java.lang.String name,
java.lang.String value)
Adds a field to the response header with the given name and value. |
void |
setIntHeader(java.lang.String name,
int value)
Adds a field to the response header with the given name and integer value. |
void |
setStatus(int sc)
Sets the status code for this response. |
void |
setStatus(int sc,
java.lang.String sm)
Sets the status code and message for this response. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public javax.servlet.http.HttpServletResponse res
Constructor Detail |
public XecureHttpServletResponse(XecureSession xecureSession, javax.servlet.http.HttpServletResponse res)
xecureSession
- XecureSession ¾ÏÈ£ / ÀÎÁõ Á¤º¸ objectres
- ¼ºí¸´ ¿£ÁøÀ¸·Î ºÎÅÍ Àü´ÞµÈ HttpServletResponse °´Ã¼Method Detail |
public java.io.PrintWriter getWriter() throws java.io.IOException
getWriter
in interface javax.servlet.ServletResponse
java.io.IOException
- if an I/O exception has occurredpublic javax.servlet.ServletOutputStream getOutputStream() throws java.io.IOException
getOutputStream
in interface javax.servlet.ServletResponse
java.io.IOException
- if an I/O exception has occurredpublic void setContentLength(int len)
setContentLength
in interface javax.servlet.ServletResponse
len
- the content lengthpublic void setContentType(java.lang.String type)
This response property may only be assigned one time. If a
writer is to be used to write a text response, this method must
be called before the method getWriter
. If an
output stream will be used to write a response, this method must
be called before the output stream is used to write response
data.
setContentType
in interface javax.servlet.ServletResponse
type
- the content's MIME typegetOutputStream
,
getWriter
public java.lang.String getCharacterEncoding()
getCharacterEncoding
in interface javax.servlet.ServletResponse
public void addCookie(javax.servlet.http.Cookie cookie)
addCookie
in interface javax.servlet.http.HttpServletResponse
cookie
- the Cookie to return to the clientpublic boolean containsHeader(java.lang.String name)
containsHeader
in interface javax.servlet.http.HttpServletResponse
name
- the header field name
public void setStatus(int sc, java.lang.String sm)
setStatus
in interface javax.servlet.http.HttpServletResponse
sc
- the status codesm
- the status messagepublic void setStatus(int sc)
sendError
method should be used
instead.
setStatus
in interface javax.servlet.http.HttpServletResponse
sc
- the status codesendError(int, java.lang.String)
public void setHeader(java.lang.String name, java.lang.String value)
containsHeader
method can be
used to test for the presence of a header before setting its
value.
setHeader
in interface javax.servlet.http.HttpServletResponse
name
- the name of the header fieldvalue
- the header field's valuecontainsHeader(java.lang.String)
public void setIntHeader(java.lang.String name, int value)
containsHeader
method can be used to test for the presence of a header before
setting its value.
setIntHeader
in interface javax.servlet.http.HttpServletResponse
name
- the name of the header fieldvalue
- the header field's integer valuecontainsHeader(java.lang.String)
public void setDateHeader(java.lang.String name, long date)
containsHeader
method can be used to test for the
presence of a header before setting its value.
setDateHeader
in interface javax.servlet.http.HttpServletResponse
name
- the name of the header fieldcontainsHeader(java.lang.String)
public void sendError(int sc, java.lang.String msg) throws java.io.IOException
sendError
in interface javax.servlet.http.HttpServletResponse
sc
- the status codemsg
- the detail message
java.io.IOException
- If an I/O error has occurred.public void sendError(int sc) throws java.io.IOException
sendError
in interface javax.servlet.http.HttpServletResponse
sc
- the status code
java.io.IOException
- If an I/O error has occurred.public void sendRedirect(java.lang.String location) throws java.io.IOException
https://hostname/path/file.html
).
Relative URLs are not permitted here.
sendRedirect
in interface javax.servlet.http.HttpServletResponse
location
- the redirect location URL
java.io.IOException
- If an I/O error has occurred.public java.lang.String encodeUrl(java.lang.String url)
All URLs emitted by a Servlet should be run through this method. Otherwise, URL rewriting cannot be used with browsers which do not support cookies.
encodeUrl
in interface javax.servlet.http.HttpServletResponse
url
- the url to be encoded.
public java.lang.String encodeRedirectUrl(java.lang.String url)
sendRedirect
method or, if encoding is not needed,
returns the URL unchanged. The implementation of this method
should include the logic to determine whether the session ID
needs to be encoded in the URL. Because the rules for making
this determination differ from those used to decide whether to
encode a normal link, this method is seperate from the
encodeUrl
method.
All URLs sent to the HttpServletResponse.sendRedirect method should be run through this method. Otherwise, URL rewriting canont be used with browsers which do not support cookies.
encodeRedirectUrl
in interface javax.servlet.http.HttpServletResponse
url
- the url to be encoded.
sendRedirect(java.lang.String)
,
encodeUrl(java.lang.String)
public java.lang.String encodeURL(java.lang.String url)
encodeURL
in interface javax.servlet.http.HttpServletResponse
public java.lang.String encodeRedirectURL(java.lang.String url)
encodeRedirectURL
in interface javax.servlet.http.HttpServletResponse
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |