protected void doService(final HttpRequest request, final HttpResponse response)
throws HttpException, IOException {
String method = request.getRequestLine().getMethod();
if (!method.equalsIgnoreCase("GET") && !method.equalsIgnoreCase("HEAD")) {
throw new MethodNotSupportedException(method + " method not supported");
}
String docroot = (String) request.getParams().getParameter("server.docroot");
String target = request.getRequestLine().getUri();
File file = new File(docroot, URLDecoder.decode(target));
if (!file.exists()) {