|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.Response
wicket.protocol.http.WebResponse
Implements responses over the HTTP protocol by holding an underlying HttpServletResponse object and providing convenience methods for using that object. Convenience methods include methods which: add a cookie, close the stream, encode a URL, redirect a request to another resource, determine if a redirect has been issued, set the content type, set the locale and, most importantly, write a String to the response output.
| Field Summary | |
protected boolean |
redirect
True if response is a redirect. |
| Method Summary | |
void |
close()
Closes response output. |
java.lang.String |
encodeURL(java.lang.String url)
Returns the given url encoded. |
javax.servlet.http.HttpServletResponse |
getHttpServletResponse()
Gets the wrapped http servlet response object. |
java.io.OutputStream |
getOutputStream()
|
boolean |
isRedirect()
Whether this response is going to redirect the user agent. |
void |
redirect(java.lang.String url)
Redirects to the given url. |
void |
setContentLength(long length)
Set the content length on the response, if appropriate in the subclass. |
void |
setContentType(java.lang.String mimeType)
Set the content type on the response. |
void |
setLastModifiedTime(Time time)
Set the contents last modified time, if appropriate in the subclass. |
void |
setLocale(java.util.Locale locale)
Output stream encoding. |
void |
write(java.lang.String string)
Writes string to response output. |
| Methods inherited from class wicket.Response |
write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean redirect
| Method Detail |
public void close()
close in class Responsepublic java.lang.String encodeURL(java.lang.String url)
encodeURL in class Responseurl - The URL to encode
public final javax.servlet.http.HttpServletResponse getHttpServletResponse()
public java.io.OutputStream getOutputStream()
getOutputStream in class ResponseResponse.getOutputStream()public final boolean isRedirect()
isRedirect in class Responsepublic void redirect(java.lang.String url)
redirect in class Responseurl - The URL to redirect topublic final void setContentType(java.lang.String mimeType)
setContentType in class ResponsemimeType - The mime typepublic void setContentLength(long length)
Response
setContentLength in class Responselength - The length of the contentResponse.setContentLength(long)public void setLastModifiedTime(Time time)
Response
setLastModifiedTime in class Responsetime - The time objectResponse.setLastModifiedTime(wicket.util.time.Time)public final void setLocale(java.util.Locale locale)
setLocale in class Responselocale - The locale use for mapping the character encodingServletResponse.setLocale(java.util.Locale)public void write(java.lang.String string)
write in class Responsestring - The string to write
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||