|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.w3c.jigsaw.servlet.JigsawHttpServletResponse
Field Summary | |
static java.lang.String |
INCLUDED
|
protected JigsawHttpServletRequest |
jrequest
|
protected java.io.ByteArrayOutputStream |
out
Our temp stream. |
Method Summary | |
void |
addCookie(javax.servlet.http.Cookie cookie)
Adds the specified cookie to the response. |
boolean |
containsHeader(java.lang.String header)
Checks whether the response message header has a field with the specified name. |
HttpSetCookie |
convertCookie(javax.servlet.http.Cookie cookie)
|
java.lang.String |
encodeRedirectUrl(java.lang.String url)
Deprecated. since jsdk2.1 |
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 |
encodeUrl(java.lang.String url)
Deprecated. since jsdk2.1 |
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. |
protected void |
flushStream(boolean close)
|
java.lang.String |
getCharacterEncoding()
Return the Charset parameter of content type |
protected javax.servlet.ServletOutputStream |
getJigsawOutputStream()
|
javax.servlet.ServletOutputStream |
getOutputStream()
Returns an output stream for writing binary response data. |
protected org.w3c.jigsaw.http.Reply |
getReply()
|
java.io.PrintWriter |
getWriter()
Returns a print writer for writing formatted text responses. |
protected boolean |
isStreamObtained()
|
void |
sendError(int i)
Sends an error response to the client using the specified status code and a default message. |
void |
sendError(int i,
java.lang.String msg)
Sends an error response to the client using the specified status code and descriptive message. |
void |
sendRedirect(java.lang.String url)
Sends a temporary redirect response to the client using the specified redirect location URL. |
void |
setContentLength(int i)
Sets the content length for this response. |
void |
setContentType(java.lang.String spec)
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. |
protected void |
setServletRequest(JigsawHttpServletRequest jrequest)
|
void |
setStatus(int i)
Sets the status code for this response. |
void |
setStatus(int i,
java.lang.String reason)
Deprecated. since jsdk2.1 |
void |
unsetHeader(java.lang.String name)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.io.ByteArrayOutputStream out
protected JigsawHttpServletRequest jrequest
public static final java.lang.String INCLUDED
Method Detail |
protected void setServletRequest(JigsawHttpServletRequest jrequest)
public void setContentLength(int i)
len
- - the content lengthpublic void setContentType(java.lang.String spec)
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.
spec
- - the content's MIME typegetOutputStream()
,
getWriter()
protected boolean isStreamObtained()
protected org.w3c.jigsaw.http.Reply getReply()
public javax.servlet.ServletOutputStream getOutputStream() throws java.io.IOException
getWriter()
protected javax.servlet.ServletOutputStream getJigsawOutputStream() throws java.io.IOException
public void setStatus(int i, java.lang.String reason)
i
- - the status codereason
- - the status messagepublic void setStatus(int i)
i
- - the status codesendError(int, java.lang.String)
public void setHeader(java.lang.String name, java.lang.String value)
name
- - the name of the header fieldvalue
- - the header field's valuecontainsHeader(java.lang.String)
public void setIntHeader(java.lang.String name, int value)
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)
name
- - the name of the header fieldvalue
- - the header field's date valuecontainsHeader(java.lang.String)
public void unsetHeader(java.lang.String name)
public void sendError(int i, java.lang.String msg) throws java.io.IOException
sc
- - the status codemsg
- - the detail messagepublic void sendError(int i) throws java.io.IOException
sc
- - the status codepublic void sendRedirect(java.lang.String url) throws java.io.IOException
url
- - the redirect location URLpublic boolean containsHeader(java.lang.String header)
name
- - the header field namepublic void addCookie(javax.servlet.http.Cookie cookie)
cookie
- - the Cookie to return to the clientpublic HttpSetCookie convertCookie(javax.servlet.http.Cookie cookie)
public java.lang.String encodeRedirectUrl(java.lang.String url)
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.
url
- - the url to be encoded.sendRedirect(java.lang.String)
,
encodeUrl(java.lang.String)
public java.lang.String encodeRedirectURL(java.lang.String url)
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.
url
- - the url to be encoded.sendRedirect(java.lang.String)
,
encodeUrl(java.lang.String)
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.
url
- - the url to be encoded.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.
url
- - the url to be encoded.public java.lang.String getCharacterEncoding()
public java.io.PrintWriter getWriter() throws java.io.IOException, java.io.UnsupportedEncodingException
getOutputStream()
,
setContentType(java.lang.String)
protected void flushStream(boolean close)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |