René Nyffenegger's collection of things on the web | |
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
|
The HttpServletResponse interface | ||
Setting headers
The following methods specify the HTTP headers:
setStatus
Sets the response status.
Some stati are predefined:
setContentType
Sets the Content-type.
The most typical values is text/html.
setContentLength
Sets the Content-length.
addCookie
Adds a cookie.
Setting any headerOther MethodsgetWriter
Returns a PrintWriter object. Call setContentType before using the PrintWriter object.
getOutputStreamsendRedirect
Sends a temporary redirect (status code 302).
sendError |