01: package phoneList.presentation;
02:
03: // Standard imports
04: import java.util.Vector;
05: import java.io.IOException;
06:
07: // Enhydra SuperServlet imports
08: import com.lutris.appserver.server.httpPresentation.HttpPresentation;
09: import com.lutris.appserver.server.httpPresentation.HttpPresentationComms;
10: import com.lutris.appserver.server.httpPresentation.HttpPresentationException;
11: import org.w3c.dom.html.HTMLAnchorElement;
12: import org.w3c.dom.Node;
13:
14: public class ErrorPresentation implements HttpPresentation {
15:
16: private static ErrorHTML error;
17:
18: public void run(HttpPresentationComms comms)
19: throws HttpPresentationException, IOException {
20:
21: try {
22: OutputError(comms);
23: } catch (Exception e) {
24: e.printStackTrace();
25: }
26: }
27:
28: public static void OutputError(HttpPresentationComms comms)
29: throws Exception {
30: String errorText = comms.request.getParameter("err");
31: error = (ErrorHTML) comms.xmlcFactory.create(ErrorHTML.class);
32: error.setTextError(errorText);
33: comms.response.writeDOM(error);
34: }
35: }
|