1 16 17 package org.apache.tester; 18 19 20 import java.io.*; 21 import javax.servlet.*; 22 import javax.servlet.http.*; 23 24 32 33 public class ErrorPage07 extends HttpServlet { 34 35 public void init() throws ServletException { 36 throw new UnavailableException 37 ("ErrorPage07 Threw UnavailableException in init()"); 38 } 39 40 41 public void doGet(HttpServletRequest request, HttpServletResponse response) 42 throws IOException, ServletException { 43 44 response.setContentType("text/plain"); 45 PrintWriter writer = response.getWriter(); 46 writer.println("ErrorPage07 FAILED - Called unavailable servlet"); 47 48 while (true) { 49 String message = StaticLogger.read(); 50 if (message == null) 51 break; 52 writer.println(message); 53 } 54 StaticLogger.reset(); 55 56 } 57 58 } 59 | Popular Tags |