1 package phoneList.presentation; 2 3 4 import java.util.Vector ; 6 import java.io.IOException ; 7 8 import com.lutris.appserver.server.httpPresentation.HttpPresentation; 10 import com.lutris.appserver.server.httpPresentation.HttpPresentationComms; 11 import com.lutris.appserver.server.httpPresentation.HttpPresentationException; 12 import org.w3c.dom.html.HTMLAnchorElement; 13 import org.w3c.dom.Node ; 14 15 public class ErrorPresentation implements HttpPresentation { 16 17 private static ErrorHTML error; 18 19 public void run(HttpPresentationComms comms) throws HttpPresentationException, IOException { 20 21 try{ 22 OutputError(comms); 23 }catch(Exception e){ 24 e.printStackTrace(); 25 } 26 } 27 28 29 public static void OutputError(HttpPresentationComms comms) 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 } 36 37 | Popular Tags |