From: Finn B. <bc...@us...> - 2001-12-20 18:20:00
|
Update of /cvsroot/jython/jython/org/python/util In directory usw-pr-cvs1:/tmp/cvs-serv11309 Modified Files: PyServlet.java Log Message: Add context parameters to the initialization properties. Context parameters will be overriden by servlet parameters. Index: PyServlet.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/util/PyServlet.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** PyServlet.java 2001/12/06 19:29:30 1.14 --- PyServlet.java 2001/12/20 18:19:58 1.15 *************** *** 72,80 **** Properties props = new Properties(); ! Enumeration e = getInitParameterNames(); while (e.hasMoreElements()) { String name = (String) e.nextElement(); props.put(name, getInitParameter(name)); } if (props.getProperty("python.home") == null && System.getProperty("python.home") == null) { --- 72,91 ---- Properties props = new Properties(); ! ! // Context parameters ! ServletContext context = getServletContext(); ! Enumeration e = context.getInitParameterNames(); while (e.hasMoreElements()) { String name = (String) e.nextElement(); + props.put(name, context.getInitParameter(name)); + } + + // Config parameters + e = getInitParameterNames(); + while (e.hasMoreElements()) { + String name = (String) e.nextElement(); props.put(name, getInitParameter(name)); } + if (props.getProperty("python.home") == null && System.getProperty("python.home") == null) { |