< prev index next >

src/com/sun/javatest/httpd/RequestHandler.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg


 146 
 147     /**
 148      * Produce and error message.  404?
 149      */
 150     protected void notFound(String[] args) {
 151     }
 152 
 153     private void error(PrintWriter out, String code, String msg) {
 154         out.print("HTTP/1.1 ");
 155         out.println(code);
 156         out.println(HTTP_CONTENT_HTML);
 157         out.print("<html><head><title>");
 158         out.print(code);
 159         out.println("</title></head><body>");
 160         out.print(i18n.getString("handler.err.txt"));
 161         out.println("<br>");
 162         out.println(code);
 163         out.println("</body></html>");
 164     }
 165 
 166     private static Hashtable urlMap;
 167 
 168     private Socket soc;
 169     private PrintWriter out;
 170     private LineNumberReader in;
 171 
 172     private static final String GET = "GET";
 173     private static final String POST = "POST";
 174     private static final String BAD_METHOD = "405 Method Not Allowed";
 175     private static final String HTTP_CONTENT_TYPE = "Content-Type: ";
 176     private static final String HTTP_CONTENT_HTML = HTTP_CONTENT_TYPE + "text/html";
 177     private static I18NResourceBundle i18n = I18NResourceBundle.getBundleForClass(RequestHandler.class);
 178     protected static boolean debug = Boolean.getBoolean("debug." + RequestHandler.class.getName());
 179 }


 146 
 147     /**
 148      * Produce and error message.  404?
 149      */
 150     protected void notFound(String[] args) {
 151     }
 152 
 153     private void error(PrintWriter out, String code, String msg) {
 154         out.print("HTTP/1.1 ");
 155         out.println(code);
 156         out.println(HTTP_CONTENT_HTML);
 157         out.print("<html><head><title>");
 158         out.print(code);
 159         out.println("</title></head><body>");
 160         out.print(i18n.getString("handler.err.txt"));
 161         out.println("<br>");
 162         out.println(code);
 163         out.println("</body></html>");
 164     }
 165 

 166 
 167     private Socket soc;
 168     private PrintWriter out;
 169     private LineNumberReader in;
 170 
 171     private static final String GET = "GET";
 172     private static final String POST = "POST";
 173     private static final String BAD_METHOD = "405 Method Not Allowed";
 174     private static final String HTTP_CONTENT_TYPE = "Content-Type: ";
 175     private static final String HTTP_CONTENT_HTML = HTTP_CONTENT_TYPE + "text/html";
 176     private static I18NResourceBundle i18n = I18NResourceBundle.getBundleForClass(RequestHandler.class);
 177     protected static boolean debug = Boolean.getBoolean("debug." + RequestHandler.class.getName());
 178 }
< prev index next >