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..


Method Index

 o getOutputStream()
Returns an output stream for writing response data.
 o setContentLength(int)
Sets the content length for this response.
 o setContentType(String)
Sets the content type for this response.

Methods

 o setContentLength
 public abstract void setContentLength(int len)
Sets the content length for this response.

Parameters:
len - the content length
 o setContentType
 public abstract void setContentType(String type)
Sets the content type for this response.

Parameters:
type - the content's MIME type
 o 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