public void handle(final HttpRequest request, final HttpResponse response,
			final HttpContext context) throws HttpException, IOException {
		String localDirectory;
		String virtualDirectory;
		String requestedFile;
		int iStartPos = 0;
		server.HttpContext httpContext = new server.HttpContext();
		
		String method = request.getRequestLine().getMethod().toUpperCase(Locale.ENGLISH);
		httpContext.setRequestMethod(method);

		if (!method.equals(HttpRequestMethods.HttpMethod_GET) 
				&& !method.equals(HttpRequestMethods.HttpMethod_HEAD) 
				&& !method.equals(HttpRequestMethods.HttpMethod_POST)) {

			ServerCore.print(method + " method not supported");
			throw new MethodNotSupportedException(method + " method not supported"); 
		}

		String uri = request.getRequestLine().getUri();

		if ((uri.indexOf(".") < 1) && (!uri.endsWith("/"))) {
			uri = uri + "/"; 
		}

		virtualDirectory = uri;

		httpContext.setVirtualPath(virtualDirectory);

		localDirectory = ServerCore.fileManager.getLocalPath(virtualDirectory);
		
		iStartPos = localDirectory.lastIndexOf("\\") + 1;
		requestedFile = localDirectory.substring(iStartPos);
		
		httpContext.setRequestedFile(requestedFile);
		
		ServerCore.print("Directory Requested : " +  localDirectory);

		if (request instanceof HttpEntityEnclosingRequest) {
			HttpEntity entity = ((HttpEntityEnclosingRequest) request).getEntity();
			byte[] entityContent = EntityUtils.toByteArray(entity);

			Map<String, String> formCollection = parsePostContent(entityContent);
			httpContext.setFormCollection(formCollection);

			ServerCore.print("Incoming entity content (bytes): " + entityContent.length);
		}

		File file = ServerCore.getResponse(httpContext);
		String mimeType = ServerCore.fileManager.getMimeType(file.getName());
		FileEntity body = new FileEntity(file, mimeType);

		response.setStatusCode(HttpStatus.SC_OK);
		response.setEntity(body);

		/*
		final File file = new File(this.Root, URLDecoder.decode(target, "UTF-8"));

		if (!file.exists()) {
			response.setStatusCode(HttpStatus.SC_NOT_FOUND);
			EntityTemplate body = new EntityTemplate(new ContentProducer() {

				public void writeTo(final OutputStream outstream) throws IOException {
					OutputStreamWriter writer = new OutputStreamWriter(outstream, "UTF-8"); 
					writer.write("<html><body><h1>");
					writer.write("File ");
					writer.write(file.getPath());
					writer.write(" not found");
					writer.write("</h1></body></html>");
					writer.flush();
				}

			});

			body.setContentType("text/html; charset=UTF-8");
			response.setEntity(body);

			WebServer.print("File " + file.getPath() + " not found");
		}
		else if (!file.canRead() || file.isDirectory()) {

			response.setStatusCode(HttpStatus.SC_FORBIDDEN);
			EntityTemplate body = new EntityTemplate(new ContentProducer() {

				public void writeTo(final OutputStream outstream) throws IOException {
					OutputStreamWriter writer = new OutputStreamWriter(outstream, "UTF-8"); 
					writer.write("<html><body><h1>");
					writer.write("Access denied");
					writer.write("</h1></body></html>");
					writer.flush();
				}

			});

			body.setContentType("text/html; charset=UTF-8");
			response.setEntity(body);

			WebServer.print("Cannot read file " + file.getPath());
		}
		else {
			response.setStatusCode(HttpStatus.SC_OK);
			FileEntity body = new FileEntity(file, "text/html");
			response.setEntity(body);

			WebServer.print("Serving file " + file.getPath());
		}*/
	}