Пример #1
0
 private Map checkForProperties(TipiContext context, Enumeration e) {
   Map result = new HashMap();
   while (e.hasMoreElements()) {
     String current = (String) e.nextElement();
     if (current.startsWith("-D")) {
       String prop = current.substring(2);
       try {
         StringTokenizer st = new StringTokenizer(prop, "=");
         String name = st.nextToken();
         String value = st.nextToken();
         System.setProperty(name, value);
         result.put(name, value);
       } catch (NoSuchElementException ex) {
         logger.info("Error parsing system property");
       }
     }
     if ("tipidef".equals(current)) {
       tipiDef = myServletConfig.getInitParameter(current);
       logger.info("Startup def: " + tipiDef);
       continue;
     }
     context.setSystemProperty(current, myServletConfig.getInitParameter(current));
   }
   return result;
 }