package javax.servlet.http; import java.io.*; /** * * 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 * */ public class HttpServletResponse { private OutputStream os; /** * Creates the Servlet Response object */ public HttpServletResponse(OutputStream os) { this.os = os; } /** * Returns an OutputStream for writing the response * @return the OutputStream */ public OutputStream getOutputStream() { return os; } private static String resp = "HTTP/1.0 200\r\nContent-Type: "; private static String crlf2 = "\r\n\r\n"; private void send(String s) throws IOException { char [] ca = StringUtils.getCharacters(s); for(int i=0;i