All Packages Class Hierarchy This Package Previous Next Index
Interface javax.servlet.ServletResponse
- public interface ServletResponse
Interface for sending a MIME datum from the servlet's service method
to the client. Network service developers implement this interface;
its methods are then used by servlets when the service method is
run, to return data to clients. The ServletResponse object is passed
as an argument to the service method..
-
getOutputStream()
- Returns an output stream for writing response data.
-
setContentLength(int)
- Sets the content length for this response.
-
setContentType(String)
- Sets the content type for this response.
setContentLength
public abstract void setContentLength(int len)
- Sets the content length for this response.
- Parameters:
- len - the content length
setContentType
public abstract void setContentType(String type)
- Sets the content type for this response.
- Parameters:
- type - the content's MIME type
getOutputStream
public abstract ServletOutputStream getOutputStream() throws IOException
- Returns an output stream for writing response data.
- Throws: IOException
- if an I/O exception has occurred
All Packages Class Hierarchy This Package Previous Next Index