Mercurial > dive4elements > gnv-client
comparison gnv/src/main/java/de/intevation/gnv/servlet/GNVActionServlet.java @ 36:ad381cc47217
Format Code to max 80 Chars per Row
gnv/trunk@172 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 02 Oct 2009 08:54:13 +0000 |
parents | 4405f31bbc30 |
children | fccf90761825 |
comparison
equal
deleted
inserted
replaced
35:4405f31bbc30 | 36:ad381cc47217 |
---|---|
13 import de.intevation.gnv.propertiesreader.PropertiesReaderFactory; | 13 import de.intevation.gnv.propertiesreader.PropertiesReaderFactory; |
14 | 14 |
15 /** | 15 /** |
16 * | 16 * |
17 * @author Tim Englich <tim.englich@intevation.de> | 17 * @author Tim Englich <tim.englich@intevation.de> |
18 * | 18 * |
19 */ | 19 */ |
20 public class GNVActionServlet extends ActionServlet { | 20 public class GNVActionServlet extends ActionServlet { |
21 /** | 21 /** |
22 * the logger, used to log exceptions and additonaly information | 22 * the logger, used to log exceptions and additonaly information |
23 */ | 23 */ |
24 private static Logger log = null; | 24 private static Logger log = null; |
25 | 25 |
26 static { | 26 static { |
27 //BasicConfigurator.configure(); | 27 // BasicConfigurator.configure(); |
28 | 28 |
29 } | 29 } |
30 | 30 |
31 static String LOGGINIG_CONFIG_FILE_ID = "de.intevation.gnv.servlet.log4j.configuration"; | 31 static String LOGGINIG_CONFIG_FILE_ID = "de.intevation.gnv.servlet.log4j.configuration"; |
32 | 32 |
33 /** | 33 /** |
34 * The UID of this Class | 34 * The UID of this Class |
35 */ | 35 */ |
36 private static final long serialVersionUID = 3597396283436383943L; | 36 private static final long serialVersionUID = 3597396283436383943L; |
37 | 37 |
40 */ | 40 */ |
41 @Override | 41 @Override |
42 public void init(ServletConfig config) throws ServletException { | 42 public void init(ServletConfig config) throws ServletException { |
43 super.init(config); | 43 super.init(config); |
44 try { | 44 try { |
45 String path = config.getServletContext().getRealPath("/")+config.getInitParameter(LOGGINIG_CONFIG_FILE_ID); | 45 String path = config.getServletContext().getRealPath("/") |
46 + config.getInitParameter(LOGGINIG_CONFIG_FILE_ID); | |
46 PropertyConfigurator.configure(path); | 47 PropertyConfigurator.configure(path); |
47 log = Logger.getLogger(GNVActionServlet.class); | 48 log = Logger.getLogger(GNVActionServlet.class); |
48 } catch (Exception e) { | 49 } catch (Exception e) { |
49 log.error(e,e); | 50 log.error(e, e); |
50 } | 51 } |
51 log.info("PropertiesReader will be configured."); | 52 log.info("PropertiesReader will be configured."); |
52 PropertiesReaderFactory.getInstance().initPropertiesReader(config); | 53 PropertiesReaderFactory.getInstance().initPropertiesReader(config); |
53 } | 54 } |
54 } | 55 } |