# HG changeset patch # User Bjoern Ricks # Date 1344431374 0 # Node ID 40d02fbf414dc3bc50a2d9b38e3780d33486a254 # Parent 763789a9accaa7eec1af462bf067c5f5e95bda2c Remove the BaseServlet class which is obsolete now BaseSevlet was used to initialize the logging. This is done by the BaseServletContextListener now which is loaded before all Servlets. flys-client/trunk@5174 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 763789a9acca -r 40d02fbf414d flys-client/src/main/java/de/intevation/flys/client/server/BaseServlet.java --- a/flys-client/src/main/java/de/intevation/flys/client/server/BaseServlet.java Wed Aug 08 13:04:07 2012 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -package de.intevation.flys.client.server; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; - -import org.apache.log4j.Logger; - -/** Documentation goes here. */ -public class BaseServlet extends HttpServlet { - - private static Logger logger = Logger.getLogger(BaseServlet.class); - - - public static final String LOG4J_PROPERTIES = "FLYS_CLIENT_LOG4J_PROPERIES"; - - - @Override - public void init() - throws ServletException - { - System.out.println("BaseServlet.init"); - - initLogging(); - initConfigParameters(); - } - - - /** Init servlet wide logging. */ - protected void initLogging() { - String log4jProperties = System.getenv(LOG4J_PROPERTIES); - - if (log4jProperties == null || log4jProperties.length() == 0) { - String file = getInitParameter("log4j-properties"); - - if (file != null && file.length() > 0) { - log4jProperties = getServletContext().getRealPath(file); - } - } - - LoggingConfigurator.init(log4jProperties); - } - - - /** Set Context Attribute (parameter) from config.xml file. */ - protected void initConfigParameters() { - String url = getInitParameter("server-url"); - logger.debug("Found server url: " + url); - - getServletContext().setAttribute("server-url", url); - } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r 763789a9acca -r 40d02fbf414d flys-client/src/main/java/de/intevation/flys/client/server/CapabilitiesParser.java --- a/flys-client/src/main/java/de/intevation/flys/client/server/CapabilitiesParser.java Wed Aug 08 13:04:07 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/CapabilitiesParser.java Wed Aug 08 13:09:34 2012 +0000 @@ -98,7 +98,7 @@ public static void main(String[] args) { logger.info("Do static Capabilities request/parsing."); - String log4jProperties = System.getenv(BaseServlet.LOG4J_PROPERTIES); + String log4jProperties = System.getenv(BaseServletContextListener.LOG4J_PROPERTIES); LoggingConfigurator.init(log4jProperties); try { diff -r 763789a9acca -r 40d02fbf414d flys-client/src/main/webapp/WEB-INF/web.xml --- a/flys-client/src/main/webapp/WEB-INF/web.xml Wed Aug 08 13:04:07 2012 +0000 +++ b/flys-client/src/main/webapp/WEB-INF/web.xml Wed Aug 08 13:09:34 2012 +0000 @@ -32,18 +32,6 @@ - BaseServlet - de.intevation.flys.client.server.BaseServlet - - - log4j-properties - /WEB-INF/log4j.properties - - - 1 - - - user de.intevation.flys.client.server.UserServiceImpl