Index: ../web/web-glue/src/main/java/com/sun/enterprise/web/WebContainer.java =================================================================== --- ../web/web-glue/src/main/java/com/sun/enterprise/web/WebContainer.java (revision 37379) +++ ../web/web-glue/src/main/java/com/sun/enterprise/web/WebContainer.java (revision ) @@ -898,8 +898,7 @@ } } else { port = Integer.parseInt(listener.getPort()); - isSecure = Boolean.valueOf( - listener.findHttpProtocol().getSecurityEnabled()); + isSecure = Boolean.valueOf(listener.findHttpProtocol().getSecurityEnabled()); address = listener.getAddress(); } @@ -920,7 +919,7 @@ jkConnector = (WebConnector) _embedded.createConnector(address, port, "ajp"); - jkConnector.configureJKProperties(); + jkConnector.configureJKProperties(listener); String defaultHost = "server"; String jkConnectorName = "jk-connector"; Index: ../web/web-glue/src/main/java/com/sun/enterprise/web/connector/coyote/PECoyoteConnector.java =================================================================== --- ../web/web-glue/src/main/java/com/sun/enterprise/web/connector/coyote/PECoyoteConnector.java (revision 36342) +++ ../web/web-glue/src/main/java/com/sun/enterprise/web/connector/coyote/PECoyoteConnector.java (revision ) @@ -965,44 +965,38 @@ /* * Configures this connector for modjk. */ - public void configureJKProperties() { + public void configureJKProperties(final NetworkListener listener) { - String propertiesURL = System.getProperty( - "com.sun.enterprise.web.connector.enableJK.propertyFile"); - - if (propertiesURL == null) { + File propertiesFile = new File(listener.getJkConfigurationFile()); + if (!propertiesFile.exists()) { + propertiesFile = new File(System.getProperty("com.sun.enterprise.web.connector.enableJK.propertyFile")); + } + if (!propertiesFile.exists()) { if (_logger.isLoggable(Level.FINEST)) { - _logger.finest("com.sun.enterprise.web.connector.enableJK.propertyFile not defined"); + _logger.finest("jk properties configuration file not defined"); } return; } if (_logger.isLoggable(Level.FINEST)) { - _logger.finest("Loading glassfish-jk.properties from " + - propertiesURL); + _logger.finest("Loading glassfish-jk.properties from " + propertiesFile.getAbsolutePath()); } - - File propertiesFile = new File(propertiesURL); if ( !propertiesFile.exists() ) { - String msg = _rb.getString("pewebcontainer.missingJKProperties"); - msg = MessageFormat.format(msg, propertiesURL); - _logger.log(Level.WARNING, msg); + _logger.log(Level.WARNING, MessageFormat.format(_rb.getString("pewebcontainer.missingJKProperties"), + propertiesFile.getAbsolutePath())); return; } Properties properties = null; - InputStream is = null; - + + InputStream is = null; try { - FileInputStream fis = new FileInputStream(propertiesFile); - is = new BufferedInputStream(fis); + is = new BufferedInputStream(new FileInputStream(propertiesFile)); properties = new Properties(); properties.load(is); } catch (Exception ex) { - String msg = _rb.getString("pewebcontainer.configureJK"); - msg = MessageFormat.format(msg, getPort()); - _logger.log(Level.SEVERE, msg, ex); + _logger.log(Level.SEVERE, MessageFormat.format(_rb.getString("pewebcontainer.configureJK"), getPort()), ex); } finally { if (is != null) { try {