From 3974b82ec4cfd360fa13d5fc108191e78af31c32 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Tue, 5 Feb 2013 21:50:19 -0500 Subject: Added default config path. Previously the config path had to be defined in web.xml, so the web.xml had to be customized during deployment. The CMSStartServlet code now has been modified to generate the config path from catalina.base and webapp's context path by default. --- .../src/com/netscape/cms/servlet/base/CMSStartServlet.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'base/common/src/com/netscape/cms') diff --git a/base/common/src/com/netscape/cms/servlet/base/CMSStartServlet.java b/base/common/src/com/netscape/cms/servlet/base/CMSStartServlet.java index e00f2bdba..3af4099a2 100644 --- a/base/common/src/com/netscape/cms/servlet/base/CMSStartServlet.java +++ b/base/common/src/com/netscape/cms/servlet/base/CMSStartServlet.java @@ -50,6 +50,18 @@ public class CMSStartServlet extends HttpServlet { super.init(config); String path = config.getInitParameter(PROP_CMS_CFG); + if (path == null) { + String[] s = config.getServletContext().getContextPath().split("/"); + if (s.length < 2) { + throw new ServletException("Unable to get subsystem from context path"); + } + String subsystem = s[1]; + + path = System.getProperty("catalina.base") + File.separator + + "conf" + File.separator + + subsystem + File.separator + "CS.cfg"; + } + File f = new File(path); String old_path = ""; if (!f.exists()) { -- cgit