From: Finn B. <bc...@us...> - 2001-03-29 19:01:58
|
Update of /cvsroot/jython/jython/org/python/util In directory usw-pr-cvs1:/tmp/cvs-serv27870 Modified Files: PyServlet.java Log Message: - Avoid Property.setProperty() because it is jdk1.2. - Use getPathInfo() when getServletPath() is undefined. Index: PyServlet.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/util/PyServlet.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** PyServlet.java 2001/03/14 14:31:57 1.9 --- PyServlet.java 2001/03/29 19:01:52 1.10 *************** *** 79,83 **** if (props.getProperty("python.home") == null && System.getProperty("python.home") == null) { ! props.setProperty("python.home", rootPath + "WEB-INF" + File.separator + "lib"); } --- 79,83 ---- if (props.getProperty("python.home") == null && System.getProperty("python.home") == null) { ! props.put("python.home", rootPath + "WEB-INF" + File.separator + "lib"); } *************** *** 105,110 **** String spath = (String)req.getAttribute("javax.servlet.include.servlet_path"); ! if (spath == null) spath = ((HttpServletRequest) req).getServletPath(); String rpath = getServletContext().getRealPath(spath); --- 105,116 ---- String spath = (String)req.getAttribute("javax.servlet.include.servlet_path"); ! if (spath == null) { spath = ((HttpServletRequest) req).getServletPath(); + if (spath == null || spath.length() == 0) { + // Servlet 2.1 puts the path of an extension-matched + // servlet in PathInfo. + spath = ((HttpServletRequest) req).getPathInfo(); + } + } String rpath = getServletContext().getRealPath(spath); |