public void handleException(Exception e) {
    	try {
    		outputStream.write("HTTP/1.0 404 Not Found\r\n".getBytes());
    		outputStream.write("Content-type: text/plain\r\n".getBytes());
    		outputStream.write(("Content-Length: " + e.getMessage().length() + "\r\n\r\n").getBytes());
    		outputStream.write(e.getMessage().getBytes());    	
    	}
    	catch(IOException ioe) {
    		// client already disconnected
    		connected = false;
    	}
    }