Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/BaseServlet.java @ 1417:42d6cf6e10b7
Moved code to parse WMS Capabilities to an own class 'CapabilitiesParser' and added code to parse SRS definitions.
flys-client/trunk@3325 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 28 Nov 2011 15:55:26 +0000 |
parents | 2ba44c1b2bab |
children | fba76f4afca9 |
comparison
equal
deleted
inserted
replaced
1416:16f19f12a962 | 1417:42d6cf6e10b7 |
---|---|
2 | 2 |
3 import javax.servlet.ServletException; | 3 import javax.servlet.ServletException; |
4 import javax.servlet.http.HttpServlet; | 4 import javax.servlet.http.HttpServlet; |
5 | 5 |
6 import org.apache.log4j.Logger; | 6 import org.apache.log4j.Logger; |
7 import org.apache.log4j.PropertyConfigurator; | |
8 | 7 |
9 | 8 |
10 public class BaseServlet extends HttpServlet { | 9 public class BaseServlet extends HttpServlet { |
11 | 10 |
12 private static Logger logger = Logger.getLogger(BaseServlet.class); | 11 private static Logger logger = Logger.getLogger(BaseServlet.class); |
35 if (file != null && file.length() > 0) { | 34 if (file != null && file.length() > 0) { |
36 log4jProperties = getServletContext().getRealPath(file); | 35 log4jProperties = getServletContext().getRealPath(file); |
37 } | 36 } |
38 } | 37 } |
39 | 38 |
40 if (log4jProperties != null && log4jProperties.length() > 0) { | 39 LoggingConfigurator.init(log4jProperties); |
41 PropertyConfigurator.configure(log4jProperties); | |
42 logger.info("Log4J logging initialized."); | |
43 } | |
44 else { | |
45 System.out.println("Error while setting up Log4J configuration."); | |
46 } | |
47 | |
48 System.out.println("BaseServlet.init finished"); | |
49 } | 40 } |
50 | 41 |
51 | 42 |
52 protected void initConfigParameters() { | 43 protected void initConfigParameters() { |
53 String url = getInitParameter("server-url"); | 44 String url = getInitParameter("server-url"); |
54 logger.debug("Found server url: " + url); | 45 logger.debug("Found server url: " + url); |
55 | 46 |
56 getServletContext().setAttribute("server-url", url); | 47 getServletContext().setAttribute("server-url", url); |
57 } | 48 } |
58 } | 49 } |
50 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |