javax.servlet.http
Class HttpServletResponse

java.lang.Object
  |
  +--javax.servlet.http.HttpServletResponse

public class HttpServletResponse
extends Object

Provides HTTP-specific functionality for sending a response. The servlet container (the abstract HttpServer on lejos) creates an HttpServletRequest object and passes it as an argument to the servlet's service method: (doGet.

Author:
Lawrie Griffiths

Constructor Summary
HttpServletResponse(OutputStream os)
          Creates the Servlet Response object
 
Method Summary
 OutputStream getOutputStream()
          Returns an OutputStream for writing the response
 void setContentType(String type)
          Set the Content Type.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Constructor Detail

HttpServletResponse

public HttpServletResponse(OutputStream os)
Creates the Servlet Response object

Method Detail

getOutputStream

public OutputStream getOutputStream()
Returns an OutputStream for writing the response

Returns:
the OutputStream

setContentType

public void setContentType(String type)
                    throws IOException
Set the Content Type. On lejos you must call this method, and you must call it before writing anything to the output stream.

Parameters:
type - the Mime type, usually text/html
IOException