From 93ae557d9e0056eb219aff32e2ae9d7e8d71713e Mon Sep 17 00:00:00 2001
From: ulrich
Date: Wed, 30 Jun 2021 14:20:55 +0000
Subject: [PATCH] Code aufgeraeumt

---
 src/de/uhilger/httpserver/adoc/AdocHandler.java |   33 +++++----------------------------
 1 files changed, 5 insertions(+), 28 deletions(-)

diff --git a/src/de/uhilger/httpserver/adoc/AdocHandler.java b/src/de/uhilger/httpserver/adoc/AdocHandler.java
index b913ba3..25dfe48 100644
--- a/src/de/uhilger/httpserver/adoc/AdocHandler.java
+++ b/src/de/uhilger/httpserver/adoc/AdocHandler.java
@@ -41,6 +41,9 @@
  * Zum Erzeugen der HTML-Version muss ein AdocFilter mit dem HttpContext 
  * verbunden sein, an den der AdocHandler gebunden ist.
  * 
+ * Benoetigt das Attribut
+ * FileHandler.ATTR_FILE_BASE
+ * 
  * @author Ulrich Hilger
  * @version 1, 16.06.2021
  */
@@ -48,43 +51,17 @@
         
   private static final Logger logger = Logger.getLogger(AdocHandler.class.getName());        
   
-  /**
-   * Benoetigt das Attribut
-   * FileHandler.ATTR_FILE_BASE
-   */
-  public AdocHandler() {
-    //super(absoluteDirectoryPathAndName);
-  }
-
   @Override
   public void handle(HttpExchange e) throws IOException {
     URI uri = e.getRequestURI();
     logger.fine(uri.toString());
-    //String query = uri.getQuery();
-    //String[] params = query.split("?&"); // hier noch Regex ermitteln
-    //String requestPathStr = uri.getPath();
-    //logger.fine("filter: " + requestUriStr);    
     
     String ctxPath = e.getHttpContext().getPath();
     String uriPath = e.getRequestURI().getPath();
     String fName = uriPath.substring(ctxPath.length());
     
-    
-    //if(requestPathStr.toLowerCase().endsWith(AdocFilter.ADOC)) {
-      AdocActor actor = new AdocActor();
-      actor.handle(e, e.getHttpContext().getAttributes().get(FileHandler.ATTR_FILE_BASE).toString(), fName);
-      /*
-      File adocfile = new File(fileBase, getFileName(e));
-      logger.fine("adocfile: " + adocfile.getAbsolutePath());
-      AdocActor actor = new AdocActor();
-      File outfile = actor.getTargetFile(adocfile, AdocActor.HTML);
-      logger.fine("outfile: " + outfile.getAbsolutePath());
-      HttpResponder fs = new HttpResponder();
-      fs.serveFile(e, outfile);
-      */
-    //} else {
-    //  super.handle(e); // andere Inhalte zu FileHandler delegieren
-    //}
+    AdocActor actor = new AdocActor();
+    actor.handle(e, e.getHttpContext().getAttributes().get(FileHandler.ATTR_FILE_BASE).toString(), fName);
   }
   
   

--
Gitblit v1.9.3