01: package com.icesoft.faces.webapp.http.core;
02:
03: import com.icesoft.faces.webapp.http.common.Request;
04: import com.icesoft.faces.webapp.http.common.Response;
05: import com.icesoft.faces.webapp.http.common.ResponseHandler;
06: import com.icesoft.faces.webapp.http.common.Server;
07:
08: import java.io.PrintStream;
09:
10: public class ServeBlankPage implements Server {
11: private static final ResponseHandler ResponseHandler = new ResponseHandler() {
12: public void respond(Response response) throws Exception {
13: response.setHeader("Content-Type", "text/html");
14: new PrintStream(response.writeBody())
15: .println("<html><body></body></html>");
16: }
17: };
18:
19: public void service(Request request) throws Exception {
20: request.respondWith(ResponseHandler);
21: }
22:
23: public void shutdown() {
24: }
25: }
|