JBossWeb SVN: r2196 - in branches/8.0.x: src/main/java/org/apache and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2013-04-30 09:36:07 -0400 (Tue, 30 Apr 2013)
New Revision: 2196
Removed:
branches/8.0.x/src/main/java/org/apache/el/
branches/8.0.x/src/main/java/org/jboss/web/ELLogger.java
branches/8.0.x/src/main/java/org/jboss/web/ELMessages.java
Modified:
branches/8.0.x/pom.xml
Log:
Remove the bundled EL.
Modified: branches/8.0.x/pom.xml
===================================================================
(Binary files differ)
Deleted: branches/8.0.x/src/main/java/org/jboss/web/ELLogger.java
===================================================================
--- branches/8.0.x/src/main/java/org/jboss/web/ELLogger.java 2013-04-26 21:08:54 UTC (rev 2195)
+++ branches/8.0.x/src/main/java/org/jboss/web/ELLogger.java 2013-04-30 13:36:07 UTC (rev 2196)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2012 Red Hat, Inc., and individual contributors
- * as indicated by the @author tags.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.web;
-
-import static org.jboss.logging.Logger.Level.ERROR;
-import static org.jboss.logging.Logger.Level.INFO;
-import static org.jboss.logging.Logger.Level.WARN;
-
-import org.jboss.logging.BasicLogger;
-import org.jboss.logging.Cause;
-import org.jboss.logging.LogMessage;
-import org.jboss.logging.Logger;
-import org.jboss.logging.Message;
-import org.jboss.logging.MessageLogger;
-
-/**
- * Logging IDs 6300-6500
- * @author Remy Maucherat
- */
-@MessageLogger(projectCode = "JBWEB")
-public interface ELLogger extends BasicLogger {
-
- /**
- * A logger with the category of the package name.
- */
- ELLogger ROOT_LOGGER = Logger.getMessageLogger(ELLogger.class, "org.apache.el");
-
-}
Deleted: branches/8.0.x/src/main/java/org/jboss/web/ELMessages.java
===================================================================
--- branches/8.0.x/src/main/java/org/jboss/web/ELMessages.java 2013-04-26 21:08:54 UTC (rev 2195)
+++ branches/8.0.x/src/main/java/org/jboss/web/ELMessages.java 2013-04-30 13:36:07 UTC (rev 2196)
@@ -1,125 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2012 Red Hat, Inc., and individual contributors
- * as indicated by the @author tags.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.web;
-
-import org.jboss.logging.Cause;
-import org.jboss.logging.Message;
-import org.jboss.logging.MessageBundle;
-import org.jboss.logging.Messages;
-
-/**
- * Logging IDs 6000-6300
- * @author Remy Maucherat
- */
-@MessageBundle(projectCode = "JBWEB")
-public interface ELMessages {
-
- /**
- * The messages
- */
- ELMessages MESSAGES = Messages.getBundle(ELMessages.class);
-
- @Message(id = 6000, value = "Expected type cannot be null")
- String errorNullType();
-
- @Message(id = 6001, value = "ValueExpression is a literal and not writable: %s")
- String errorPropertyNotWritable(Object value);
-
- @Message(id = 6002, value = "Cannot convert %s of type %s to %s")
- IllegalArgumentException errorConvertingWithException(Object obj, Class<? extends Object> clazz, String type);
-
- @Message(id = 6003, value = "Cannot convert %s of type %s to %s")
- String errorConverting(Object obj, Class<? extends Object> clazz, Class<? extends Object> type);
-
- @Message(id = 6004, value = "Cannot compare %s to %s")
- String errorComparing(Object obj1, Object obj2);
-
- @Message(id = 6005, value = "Expression cannot be null")
- String errorNullExpression();
-
- @Message(id = 6006, value = "Expression cannot contain both '#{..}' and '${..}' : %s")
- String errorMixedExpression(String expression);
-
- @Message(id = 6007, value = "Failed to parse the expression [%s]")
- String errorParse(String expression);
-
- @Message(id = 6008, value = "Expression uses functions, but no FunctionMapper was provided")
- String missingFunctionMapper();
-
- @Message(id = 6009, value = "Function ''%s'' not found")
- String functionNotFound(String function);
-
- @Message(id = 6010, value = "Function ''%s'' specifies %s params, but %s were declared")
- String functionWrongParameterCount(String function, int count, int declared);
-
- @Message(id = 6011, value = "Parameter types cannot be null")
- String nullParameterTypes();
-
- @Message(id = 6012, value = "The identifier [%s] is not a valid Java identifier as required by section 1.19 of the EL specification (Identifier ::= Java language identifier). This check can be disabled by setting the system property org.apache.el.parser.SKIP_IDENTIFIER_CHECK to true.")
- String errorNotJavaIdentifier(String identifier);
-
- @Message(id = 6013, value = "Error calling function ''%s''")
- String errorCallingFunction(String function);
-
- @Message(id = 6014, value = "ELResolver cannot handle a null base Object with identifier ''%s''")
- String errorNullBaseObject(String identifier);
-
- @Message(id = 6015, value = "ELResolver did not handle type: %s with property of ''%s''")
- String errorResolving(Object type, Object property);
-
- @Message(id = 6016, value = "Target Unreachable, identifier ''%s'' resolved to null")
- String errorResolvingIdentifierType(String identifier);
-
- @Message(id = 6017, value = "Target Unreachable, ''%s'' returned null")
- String errorResolvingProperty(Object property);
-
- @Message(id = 6018, value = "Illegal Syntax for Set Operation")
- String errorWithSetSyntax();
-
- @Message(id = 6019, value = "Method not found: %s.%s(%s)")
- String methodNotFound(Object base, Object method, String parameters);
-
- @Message(id = 6020, value = "Unable to find unambiguous method: %s.%s(%s)")
- String ambiguousMethod(Object base, Object method, String parameters);
-
- @Message(id = 6021, value = "Invalid method expression: %s")
- String invalidMethodExpression(String expression);
-
- @Message(id = 6022, value = "Function mapper is null")
- NullPointerException invalidNullFunctionMapper();
-
- @Message(id = 6023, value = "Local name is null")
- NullPointerException invalidNullLocalName();
-
- @Message(id = 6024, value = "Method is null")
- NullPointerException invalidNullMethod();
-
- @Message(id = 6025, value = "Variable mapper is null")
- NullPointerException invalidNullVariableMapper();
-
- @Message(id = 6026, value = "Cannot set variables on factory")
- UnsupportedOperationException cannotSetVariablesOnFactory();
-
- @Message(id = 6027, value = "Identity '%s' was null and was unable to invoke")
- String invalidNullIdentity(String image);
-
- @Message(id = 6028, value = "Identity '%s' does not reference a MethodExpression instance, returned type: %s")
- String invalidIdentityHasWrongType(String image, String returnedType);
-
-}
11 years, 10 months
JBossWeb SVN: r2195 - in branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina: startup and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: aogburn
Date: 2013-04-26 17:08:54 -0400 (Fri, 26 Apr 2013)
New Revision: 2195
Modified:
branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina/realm/RealmBase.java
branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina/startup/ContextConfig.java
Log:
[BZ-957256] commit one-off fixes
Modified: branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina/realm/RealmBase.java
===================================================================
--- branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina/realm/RealmBase.java 2013-04-26 19:04:52 UTC (rev 2194)
+++ branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina/realm/RealmBase.java 2013-04-26 21:08:54 UTC (rev 2195)
@@ -49,7 +49,6 @@
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.core.ContainerBase;
-import org.apache.catalina.deploy.LoginConfig;
import org.apache.catalina.deploy.SecurityCollection;
import org.apache.catalina.deploy.SecurityConstraint;
import org.apache.catalina.util.HexUtils;
@@ -741,31 +740,6 @@
if (constraints == null || constraints.length == 0)
return (true);
- // Specifically allow access to the form login and form error pages
- // and the "j_security_check" action
- LoginConfig config = context.getLoginConfig();
- if ((config != null) &&
- (Constants.FORM_METHOD.equals(config.getAuthMethod()))) {
- String requestURI = request.getRequestPathMB().toString();
- String loginPage = config.getLoginPage();
- if (loginPage.equals(requestURI)) {
- if (log.isDebugEnabled())
- log.debug(" Allow access to login page " + loginPage);
- return (true);
- }
- String errorPage = config.getErrorPage();
- if (errorPage.equals(requestURI)) {
- if (log.isDebugEnabled())
- log.debug(" Allow access to error page " + errorPage);
- return (true);
- }
- if (requestURI.endsWith(Constants.FORM_ACTION)) {
- if (log.isDebugEnabled())
- log.debug(" Allow access to username/password submission");
- return (true);
- }
- }
-
// Which user principal have we already authenticated?
Principal principal = request.getPrincipal();
boolean status = false;
Modified: branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina/startup/ContextConfig.java
===================================================================
--- branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina/startup/ContextConfig.java 2013-04-26 19:04:52 UTC (rev 2194)
+++ branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/java/org/apache/catalina/startup/ContextConfig.java 2013-04-26 21:08:54 UTC (rev 2195)
@@ -109,13 +109,37 @@
/**
+ * The string resources for this package.
+ */
+ protected static final StringManager sm =
+ StringManager.getManager(Constants.Package);
+
+
+ /**
* The set of Authenticators that we know how to configure. The key is
* the name of the implemented authentication method, and the value is
* the fully qualified Java class name of the corresponding Valve.
*/
protected static Properties authenticators = null;
+ static {
+ // Load our mapping properties
+ authenticators = new Properties();
+ try {
+ InputStream is = ContextConfig.class.getClassLoader().getResourceAsStream("org/apache/catalina/startup/Authenticators.properties");
+ if (is != null) {
+ authenticators.load(is);
+ } else {
+ log.error(sm.getString(
+ "contextConfig.authenticatorResources"));
+ }
+ } catch (IOException e) {
+ log.error(sm.getString(
+ "contextConfig.authenticatorResources"), e);
+ }
+ }
+
/**
* The Context we are associated with.
*/
@@ -129,13 +153,6 @@
/**
- * The string resources for this package.
- */
- protected static final StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- /**
* Deployment count.
*/
protected static long deploymentCount = 0L;
@@ -276,26 +293,6 @@
customAuthenticators.get(loginConfig.getAuthMethod());
}
if (authenticator == null) {
- // Load our mapping properties if necessary
- if (authenticators == null) {
- try {
- InputStream is=this.getClass().getClassLoader().getResourceAsStream("org/apache/catalina/startup/Authenticators.properties");
- if( is!=null ) {
- authenticators = new Properties();
- authenticators.load(is);
- } else {
- log.error(sm.getString(
- "contextConfig.authenticatorResources"));
- ok=false;
- return;
- }
- } catch (IOException e) {
- log.error(sm.getString(
- "contextConfig.authenticatorResources"), e);
- ok = false;
- return;
- }
- }
// Identify the class name of the Valve we should configure
String authenticatorName = null;
11 years, 10 months
JBossWeb SVN: r2194 - branches.
by jbossweb-commits@lists.jboss.org
Author: aogburn
Date: 2013-04-26 15:04:52 -0400 (Fri, 26 Apr 2013)
New Revision: 2194
Added:
branches/JBOSSWEB_7_0_17_FINAL_BZ-957256/
Log:
[BZ-957267] creating one-off branch
11 years, 10 months
JBossWeb SVN: r2193 - branches/8.0.x/src/main/java/org/jboss/web.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2013-04-25 11:26:59 -0400 (Thu, 25 Apr 2013)
New Revision: 2193
Modified:
branches/8.0.x/src/main/java/org/jboss/web/CatalinaMessages.java
Log:
Fix message id.
Modified: branches/8.0.x/src/main/java/org/jboss/web/CatalinaMessages.java
===================================================================
--- branches/8.0.x/src/main/java/org/jboss/web/CatalinaMessages.java 2013-04-25 15:26:37 UTC (rev 2192)
+++ branches/8.0.x/src/main/java/org/jboss/web/CatalinaMessages.java 2013-04-25 15:26:59 UTC (rev 2193)
@@ -990,7 +990,7 @@
@Message(id = 366, value = "Null read or write listener")
NullPointerException nullListener();
- @Message(id = 366, value = "Cannot use a read or write listener without upgrading or starting async")
+ @Message(id = 367, value = "Cannot use a read or write listener without upgrading or starting async")
IllegalStateException cannotSetListenerWithoutUpgradeOrAsync();
}
11 years, 10 months
JBossWeb SVN: r2192 - branches/8.0.x/src/main/java/org/apache/catalina/core.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2013-04-25 11:26:37 -0400 (Thu, 25 Apr 2013)
New Revision: 2192
Modified:
branches/8.0.x/src/main/java/org/apache/catalina/core/StandardWrapperValve.java
Log:
The exception is mandatory for the error events. Make a dummy one if there's none.
Modified: branches/8.0.x/src/main/java/org/apache/catalina/core/StandardWrapperValve.java
===================================================================
--- branches/8.0.x/src/main/java/org/apache/catalina/core/StandardWrapperValve.java 2013-04-18 02:40:28 UTC (rev 2191)
+++ branches/8.0.x/src/main/java/org/apache/catalina/core/StandardWrapperValve.java 2013-04-25 15:26:37 UTC (rev 2192)
@@ -543,11 +543,15 @@
try {
// Call error notifications for IO listeners
if (error) {
+ Throwable throwable = asyncContext.getError();
+ if (throwable == null) {
+ throwable = new Exception();
+ }
if (request.getReadListener() != null) {
- request.getReadListener().onError(asyncContext.getError());
+ request.getReadListener().onError(throwable);
}
if (response.getWriteListener() != null) {
- response.getWriteListener().onError(asyncContext.getError());
+ response.getWriteListener().onError(throwable);
}
}
} catch (Throwable e) {
11 years, 10 months
JBossWeb SVN: r2191 - tags/JBOSSWEB_7_0_16_FINAL_BZ-952835.
by jbossweb-commits@lists.jboss.org
Author: bmaxwell
Date: 2013-04-17 22:40:28 -0400 (Wed, 17 Apr 2013)
New Revision: 2191
Modified:
tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/build.xml
Log:
[BZ-952835] updated build.xml version
Modified: tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/build.xml
===================================================================
--- tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/build.xml 2013-04-16 22:27:30 UTC (rev 2190)
+++ tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/build.xml 2013-04-18 02:40:28 UTC (rev 2191)
@@ -15,8 +15,8 @@
<property name="year" value="2010" />
<property name="version.major" value="7" />
<property name="version.minor" value="0" />
- <property name="version.build" value="0" />
- <property name="version.patch" value="0" />
+ <property name="version.build" value="16" />
+ <property name="version.patch" value="BZ-952835" />
<property name="version.tag" value="SNAPSHOT" />
<property name="version" value="${version.major}.${version.minor}.${version.build}.${version.tag}" />
<property name="version.number" value="${version.major}.${version.minor}.${version.build}.${version.patch}" />
11 years, 10 months
JBossWeb SVN: r2189 - tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/realm.
by jbossweb-commits@lists.jboss.org
Author: bmaxwell
Date: 2013-04-16 16:29:42 -0400 (Tue, 16 Apr 2013)
New Revision: 2189
Modified:
tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/realm/RealmBase.java
Log:
[BZ-952835] CVE-2012-3546 Tomcat/JBoss Web - Bypass of security constraints
Modified: tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/realm/RealmBase.java
===================================================================
--- tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/realm/RealmBase.java 2013-04-16 20:26:42 UTC (rev 2188)
+++ tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/realm/RealmBase.java 2013-04-16 20:29:42 UTC (rev 2189)
@@ -49,7 +49,6 @@
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.core.ContainerBase;
-import org.apache.catalina.deploy.LoginConfig;
import org.apache.catalina.deploy.SecurityCollection;
import org.apache.catalina.deploy.SecurityConstraint;
import org.apache.catalina.util.HexUtils;
@@ -741,31 +740,6 @@
if (constraints == null || constraints.length == 0)
return (true);
- // Specifically allow access to the form login and form error pages
- // and the "j_security_check" action
- LoginConfig config = context.getLoginConfig();
- if ((config != null) &&
- (Constants.FORM_METHOD.equals(config.getAuthMethod()))) {
- String requestURI = request.getRequestPathMB().toString();
- String loginPage = config.getLoginPage();
- if (loginPage.equals(requestURI)) {
- if (log.isDebugEnabled())
- log.debug(" Allow access to login page " + loginPage);
- return (true);
- }
- String errorPage = config.getErrorPage();
- if (errorPage.equals(requestURI)) {
- if (log.isDebugEnabled())
- log.debug(" Allow access to error page " + errorPage);
- return (true);
- }
- if (requestURI.endsWith(Constants.FORM_ACTION)) {
- if (log.isDebugEnabled())
- log.debug(" Allow access to username/password submission");
- return (true);
- }
- }
-
// Which user principal have we already authenticated?
Principal principal = request.getPrincipal();
boolean status = false;
11 years, 11 months
JBossWeb SVN: r2188 - in tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina: core and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: bmaxwell
Date: 2013-04-16 16:26:42 -0400 (Tue, 16 Apr 2013)
New Revision: 2188
Modified:
tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/connector/Connector.java
tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/connector/CoyoteAdapter.java
tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/core/StandardContext.java
Log:
[BZ-952835] Added fix so allowedHosts are correctly found. Also added changes so that a copy of the Set of allowedHost is stored as lower case to avoid a bug which was found in the original fix for this
Modified: tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/connector/Connector.java
===================================================================
--- tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/connector/Connector.java 2013-04-16 20:22:00 UTC (rev 2187)
+++ tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/connector/Connector.java 2013-04-16 20:26:42 UTC (rev 2188)
@@ -19,6 +19,8 @@
package org.apache.catalina.connector;
import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
import java.util.Set;
import javax.management.MBeanRegistration;
@@ -268,7 +270,7 @@
* Allowed virtual hosts.
*/
protected Set<String> allowedHosts = null;
-
+ protected Set<String> allowedHostsIgnoreCase = new HashSet();
protected static HashMap<String, String> replacements = new HashMap<String, String>();
static {
@@ -391,8 +393,20 @@
public void setAllowedHosts(Set<String> allowedHosts) {
this.allowedHosts = allowedHosts;
-
+ addAllowedHostsToLowerCaseSet();
}
+
+ private void addAllowedHostsToLowerCaseSet() {
+ Iterator<String> it = allowedHosts.iterator();
+ while (it.hasNext()) {
+ String allowedHost = it.next();
+ allowedHostsIgnoreCase.add(allowedHost.toLowerCase());
+ }
+ }
+
+ public Set<String> getAllowedHostsIgnoreCase() {
+ return allowedHostsIgnoreCase;
+ }
/**
* Is this connector available for processing requests?
Modified: tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/connector/CoyoteAdapter.java
===================================================================
--- tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/connector/CoyoteAdapter.java 2013-04-16 20:22:00 UTC (rev 2187)
+++ tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/connector/CoyoteAdapter.java 2013-04-16 20:26:42 UTC (rev 2188)
@@ -55,6 +55,7 @@
import org.apache.catalina.Context;
import org.apache.catalina.Globals;
+import org.apache.catalina.Host;
import org.apache.catalina.Manager;
import org.apache.catalina.Session;
import org.apache.catalina.Wrapper;
@@ -542,11 +543,13 @@
res.setMessage("Context not mapped");
return false;
}
- if (connector.getAllowedHosts() != null
- && !connector.getAllowedHosts().contains(request.getMappingData().host)) {
- res.setStatus(403);
- res.setMessage("Host access is forbidden through this connector");
- return false;
+ if (connector.getAllowedHosts() != null) {
+ Host host = (Host) request.getMappingData().host;
+ if (!connector.getAllowedHostsIgnoreCase().contains(host.getName())) {
+ res.setStatus(403);
+ res.setMessage("Host access is forbidden through this connector");
+ return false;
+ }
}
// Filter trace method
Modified: tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/core/StandardContext.java
===================================================================
--- tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/core/StandardContext.java 2013-04-16 20:22:00 UTC (rev 2187)
+++ tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/java/org/apache/catalina/core/StandardContext.java 2013-04-16 20:26:42 UTC (rev 2188)
@@ -3341,6 +3341,8 @@
try {
results[i] = (EventListener) instanceManager.newInstance(listeners[i]);
} catch (Throwable t) {
+ System.err.println("[org.apache.catalina.core.StandardContext] contextListenerStart exception:");
+ t.printStackTrace();
getLogger().error
(sm.getString("standardContext.applicationListener",
listeners[i]), t);
@@ -3392,6 +3394,9 @@
listener.contextInitialized(event);
fireContainerEvent("afterContextInitialized", listener);
} catch (Throwable t) {
+ System.err.println("[org.apache.catalina.core.StandardContext] contextListenerStart exception:");
+ t.printStackTrace();
+
fireContainerEvent("afterContextInitialized", listener);
getLogger().error
(sm.getString("standardContext.listenerStart",
@@ -3425,6 +3430,9 @@
try {
results[i] = (EventListener) listeners[i];
} catch (Throwable t) {
+ System.err.println("[org.apache.catalina.core.StandardContext] listenerStart exception:");
+ t.printStackTrace();
+
getLogger().error
(sm.getString("standardContext.applicationListener",
listeners[i]), t);
11 years, 11 months
JBossWeb SVN: r2187 - tags.
by jbossweb-commits@lists.jboss.org
Author: bmaxwell
Date: 2013-04-16 16:22:00 -0400 (Tue, 16 Apr 2013)
New Revision: 2187
Added:
tags/JBOSSWEB_7_0_16_FINAL_BZ-952835/
Log:
[BZ-952835] create one off patch branch
11 years, 11 months
JBossWeb SVN: r2186 - branches/7.0.x/java/org/apache/catalina/startup.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2013-04-16 08:27:22 -0400 (Tue, 16 Apr 2013)
New Revision: 2186
Modified:
branches/7.0.x/java/org/apache/catalina/startup/ContextConfig.java
Log:
[BZ922180]: Port from Tomcat using a static initializer to init authenticators map.
Modified: branches/7.0.x/java/org/apache/catalina/startup/ContextConfig.java
===================================================================
--- branches/7.0.x/java/org/apache/catalina/startup/ContextConfig.java 2013-04-16 12:25:16 UTC (rev 2185)
+++ branches/7.0.x/java/org/apache/catalina/startup/ContextConfig.java 2013-04-16 12:27:22 UTC (rev 2186)
@@ -115,7 +115,6 @@
*/
protected static Properties authenticators = null;
-
/**
* The Context we are associated with.
*/
@@ -144,7 +143,22 @@
protected static final LoginConfig DUMMY_LOGIN_CONFIG =
new LoginConfig("NONE", null, null, null);
+ static {
+ // Load our mapping properties
+ authenticators = new Properties();
+ try {
+ InputStream is = ContextConfig.class.getClassLoader().getResourceAsStream("org/apache/catalina/startup/Authenticators.properties");
+ if (is != null) {
+ authenticators.load(is);
+ } else {
+ log.error(sm.getString("contextConfig.authenticatorResources"));
+ }
+ } catch (IOException e) {
+ log.error(sm.getString("contextConfig.authenticatorResources"), e);
+ }
+ }
+
// ------------------------------------------------------------- Properties
@@ -276,26 +290,6 @@
customAuthenticators.get(loginConfig.getAuthMethod());
}
if (authenticator == null) {
- // Load our mapping properties if necessary
- if (authenticators == null) {
- try {
- InputStream is=this.getClass().getClassLoader().getResourceAsStream("org/apache/catalina/startup/Authenticators.properties");
- if( is!=null ) {
- authenticators = new Properties();
- authenticators.load(is);
- } else {
- log.error(sm.getString(
- "contextConfig.authenticatorResources"));
- ok=false;
- return;
- }
- } catch (IOException e) {
- log.error(sm.getString(
- "contextConfig.authenticatorResources"), e);
- ok = false;
- return;
- }
- }
// Identify the class name of the Valve we should configure
String authenticatorName = null;
11 years, 11 months