mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-08 01:26:03 +00:00
Looking at one more place (#1314)
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7728 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
37f082e896
commit
35362e9dab
1 file changed
+6
-1
@@ -226,10 +226,15 @@ public class WebAppMain implements ServletContextListener {
|
||||
private File getHomeDir(ServletContextEvent event) {
|
||||
// check JNDI for the home directory first
|
||||
try {
|
||||
Context env = (Context) new InitialContext().lookup("java:comp/env");
|
||||
InitialContext iniCtxt = new InitialContext();
|
||||
Context env = (Context) iniCtxt.lookup("java:comp/env");
|
||||
String value = (String) env.lookup("HUDSON_HOME");
|
||||
if(value!=null && value.trim().length()>0)
|
||||
return new File(value.trim());
|
||||
// look at one more place. See issue #1314
|
||||
value = (String) iniCtxt.lookup("HUDSON_HOME");
|
||||
if(value!=null && value.trim().length()>0)
|
||||
return new File(value.trim());
|
||||
} catch (NamingException e) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user