1 4 5 6 11 15 16 package org.joseki.server.webserver; 18 19 import org.mortbay.http.* ; 20 import org.mortbay.http.handler.*; 21 24 import java.io.* ; 25 import java.util.*; 26 27 28 36 public class NotFoundHandler2 extends NotFoundHandler 37 { 38 39 public void handle(String pathInContext, 40 String pathParams, 41 HttpRequest request, 42 HttpResponse response) 43 throws HttpException, IOException 44 { 45 String method=request.getMethod(); 47 if (method.equals(HttpRequest.__GET)) 48 { 49 response.sendError(HttpResponse.__404_Not_Found, 50 "Could not find resource for "+ 51 request.getPath()+" ("+new Date()+")"); 52 return ; 53 } 54 55 super.handle(pathInContext, pathParams, request, response) ; 56 } 57 } 58 59 85 | Popular Tags |