From d3de3099536fa732450631c88706977efc4439a8 Mon Sep 17 00:00:00 2001 From: reger Date: Mon, 20 Jan 2014 08:12:35 +0100 Subject: [PATCH] fix IOexception logging issue in DefaultServlet reason not sure but .logException triggers another exception --- source/net/yacy/http/servlets/YaCyDefaultServlet.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/source/net/yacy/http/servlets/YaCyDefaultServlet.java b/source/net/yacy/http/servlets/YaCyDefaultServlet.java index bf2da4e5e..70f17fd9d 100644 --- a/source/net/yacy/http/servlets/YaCyDefaultServlet.java +++ b/source/net/yacy/http/servlets/YaCyDefaultServlet.java @@ -48,12 +48,9 @@ import javax.servlet.http.HttpServletResponse; import net.yacy.cora.date.GenericFormatter; import net.yacy.cora.document.analysis.Classification; -import net.yacy.cora.order.Base64Order; -import net.yacy.cora.protocol.Domains; import net.yacy.cora.protocol.HeaderFramework; import net.yacy.cora.protocol.RequestHeader; import net.yacy.cora.util.ConcurrentLog; -import net.yacy.data.UserDB; import net.yacy.data.UserDB.AccessRight; import net.yacy.data.UserDB.Entry; import net.yacy.http.ProxyHandler; @@ -946,13 +943,11 @@ public class YaCyDefaultServlet extends HttpServlet { final int q = in.indexOf("\"".getBytes(), off + 22); if (q > 0) { final String path = in.toString(off + 22, q - off - 22); - try { RequestDispatcher dispatcher = request.getRequestDispatcher(path); + try { dispatcher.include(request, response); - //response.flushBuffer(); - } catch (Exception e) { - ConcurrentLog.logException(e); - throw new ServletException(); + } catch (IOException ex) { + ConcurrentLog.warn("FILEHANDLER", "YaCyDefaultServlet: file not found " + path); } } }