JBossWeb SVN: r2076 - in trunk: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-08-31 10:54:47 -0400 (Fri, 31 Aug 2012)
New Revision: 2076
Modified:
trunk/src/main/java/org/apache/catalina/realm/RealmBase.java
trunk/webapps/docs/changelog.xml
Log:
Port patch for security constraints matching (53801). Risky, so no backport plans.
Modified: trunk/src/main/java/org/apache/catalina/realm/RealmBase.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/realm/RealmBase.java 2012-08-30 17:19:13 UTC (rev 2075)
+++ trunk/src/main/java/org/apache/catalina/realm/RealmBase.java 2012-08-31 14:54:47 UTC (rev 2076)
@@ -566,14 +566,15 @@
}
}
if(matched) {
- found = true;
if(length > longest) {
+ found = false;
if(results != null) {
results.clear();
}
longest = length;
}
if(collection[j].findMethod(method)) {
+ found = true;
if(results == null) {
results = new ArrayList();
}
@@ -699,7 +700,7 @@
* Convert an ArrayList to a SecurityContraint [].
*/
private SecurityConstraint [] resultsToArray(ArrayList results) {
- if(results == null) {
+ if(results == null || results.size() == 0) {
return null;
}
SecurityConstraint [] array = new SecurityConstraint[results.size()];
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2012-08-30 17:19:13 UTC (rev 2075)
+++ trunk/webapps/docs/changelog.xml 2012-08-31 14:54:47 UTC (rev 2076)
@@ -36,6 +36,9 @@
<jboss-jira>AS7-4232</jboss-jira>: Modify async error processing based on a stricter spec
interpretation. (remm)
</fix>
+ <fix>
+ <bug>53801</bug>: Fix some edge case with overlapping security constraints. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
12 years, 4 months
JBossWeb SVN: r2075 - in trunk/src/main/java/org: apache/catalina/manager and 5 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-08-30 13:19:13 -0400 (Thu, 30 Aug 2012)
New Revision: 2075
Removed:
trunk/src/main/java/org/apache/catalina/filters/LocalStrings.properties
trunk/src/main/java/org/apache/catalina/filters/LocalStrings_es.properties
trunk/src/main/java/org/apache/catalina/filters/LocalStrings_fr.properties
trunk/src/main/java/org/apache/catalina/manager/Constants.java
trunk/src/main/java/org/apache/catalina/manager/LocalStrings.properties
trunk/src/main/java/org/apache/catalina/manager/LocalStrings_de.properties
trunk/src/main/java/org/apache/catalina/manager/LocalStrings_es.properties
trunk/src/main/java/org/apache/catalina/manager/LocalStrings_fr.properties
trunk/src/main/java/org/apache/catalina/manager/LocalStrings_ja.properties
trunk/src/main/java/org/apache/catalina/manager/StatusManagerServlet.java
trunk/src/main/java/org/apache/catalina/manager/StatusTransformer.java
trunk/src/main/java/org/apache/catalina/security/LocalStrings.properties
trunk/src/main/java/org/apache/catalina/security/LocalStrings_es.properties
trunk/src/main/java/org/apache/catalina/security/LocalStrings_fr.properties
trunk/src/main/java/org/apache/catalina/security/LocalStrings_ja.properties
trunk/src/main/java/org/apache/catalina/servlets/LocalStrings.properties
trunk/src/main/java/org/apache/catalina/servlets/LocalStrings_es.properties
trunk/src/main/java/org/apache/catalina/servlets/LocalStrings_fr.properties
trunk/src/main/java/org/apache/catalina/servlets/LocalStrings_ja.properties
trunk/src/main/java/org/apache/catalina/startup/HomesUserDatabase.java
trunk/src/main/java/org/apache/catalina/startup/LocalStrings.properties
trunk/src/main/java/org/apache/catalina/startup/LocalStrings_es.properties
trunk/src/main/java/org/apache/catalina/startup/LocalStrings_fr.properties
trunk/src/main/java/org/apache/catalina/startup/LocalStrings_ja.properties
trunk/src/main/java/org/apache/catalina/startup/PasswdUserDatabase.java
trunk/src/main/java/org/apache/catalina/startup/UserConfig.java
trunk/src/main/java/org/apache/catalina/startup/UserDatabase.java
trunk/src/main/java/org/apache/catalina/util/LocalStrings.properties
trunk/src/main/java/org/apache/catalina/util/LocalStrings_es.properties
trunk/src/main/java/org/apache/catalina/util/LocalStrings_fr.properties
trunk/src/main/java/org/apache/catalina/util/LocalStrings_ja.properties
Modified:
trunk/src/main/java/org/apache/catalina/filters/CsrfPreventionFilter.java
trunk/src/main/java/org/apache/catalina/filters/ExpiresFilter.java
trunk/src/main/java/org/apache/catalina/filters/FilterBase.java
trunk/src/main/java/org/apache/catalina/filters/RequestFilter.java
trunk/src/main/java/org/apache/catalina/security/SecurityUtil.java
trunk/src/main/java/org/apache/catalina/servlets/DefaultServlet.java
trunk/src/main/java/org/apache/catalina/servlets/WebdavServlet.java
trunk/src/main/java/org/apache/catalina/startup/Constants.java
trunk/src/main/java/org/apache/catalina/startup/ContextConfig.java
trunk/src/main/java/org/apache/catalina/startup/EngineConfig.java
trunk/src/main/java/org/apache/catalina/startup/ExpandWar.java
trunk/src/main/java/org/apache/catalina/startup/HostConfig.java
trunk/src/main/java/org/apache/catalina/util/HexUtils.java
trunk/src/main/java/org/apache/catalina/util/ParameterMap.java
trunk/src/main/java/org/apache/catalina/util/ResourceSet.java
trunk/src/main/java/org/jboss/web/CatalinaLogger.java
trunk/src/main/java/org/jboss/web/CatalinaMessages.java
Log:
New i18n for more packages (and some removals of old stuff).
Modified: trunk/src/main/java/org/apache/catalina/filters/CsrfPreventionFilter.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/filters/CsrfPreventionFilter.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/filters/CsrfPreventionFilter.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -17,6 +17,8 @@
package org.apache.catalina.filters;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.IOException;
import java.security.SecureRandom;
import java.util.HashSet;
@@ -103,16 +105,13 @@
Class<?> clazz = Class.forName(randomClass);
randomSource = (Random) clazz.newInstance();
} catch (ClassNotFoundException e) {
- ServletException se = new ServletException(sm.getString(
- "csrfPrevention.invalidRandomClass", randomClass), e);
+ ServletException se = new ServletException(MESSAGES.cannotCreateRandom(randomClass), e);
throw se;
} catch (InstantiationException e) {
- ServletException se = new ServletException(sm.getString(
- "csrfPrevention.invalidRandomClass", randomClass), e);
+ ServletException se = new ServletException(MESSAGES.cannotCreateRandom(randomClass), e);
throw se;
} catch (IllegalAccessException e) {
- ServletException se = new ServletException(sm.getString(
- "csrfPrevention.invalidRandomClass", randomClass), e);
+ ServletException se = new ServletException(MESSAGES.cannotCreateRandom(randomClass), e);
throw se;
}
}
Modified: trunk/src/main/java/org/apache/catalina/filters/ExpiresFilter.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/filters/ExpiresFilter.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/filters/ExpiresFilter.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -16,6 +16,8 @@
package org.apache.catalina.filters;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -42,6 +44,7 @@
import javax.servlet.http.HttpServletResponseWrapper;
import org.jboss.logging.Logger;
+import org.jboss.web.CatalinaLogger;
/**
* <p>
@@ -1019,8 +1022,6 @@
private static final String HEADER_LAST_MODIFIED = "Last-Modified";
- private static Logger log = Logger.getLogger(ExpiresFilter.class);
-
private static final String PARAMETER_EXPIRES_BY_TYPE = "ExpiresByType";
private static final String PARAMETER_EXPIRES_DEFAULT = "ExpiresDefault";
@@ -1180,11 +1181,7 @@
HttpServletResponse httpResponse = (HttpServletResponse) response;
if (response.isCommitted()) {
- if (log.isDebugEnabled()) {
- log.debug(sm.getString(
- "expiresFilter.responseAlreadyCommited",
- httpRequest.getRequestURL()));
- }
+ CatalinaLogger.FILTERS_LOGGER.expiresResponseAlreadyCommitted(httpRequest.getRequestURI());
chain.doFilter(request, response);
} else {
XHttpServletResponse xResponse = new XHttpServletResponse(
@@ -1298,9 +1295,7 @@
}
break;
default:
- throw new IllegalStateException(sm.getString(
- "expiresFilter.unsupportedStartingPoint",
- configuration.getStartingPoint()));
+ throw MESSAGES.expiresUnsupportedStartingPoint("" + configuration.getStartingPoint());
}
for (Duration duration : configuration.getDurations()) {
calendar.add(duration.getUnit().getCalendardField(),
@@ -1333,19 +1328,12 @@
} else if (name.equalsIgnoreCase(PARAMETER_EXPIRES_EXCLUDED_RESPONSE_STATUS_CODES)) {
this.excludedResponseStatusCodes = commaDelimitedListToIntArray(value);
} else {
- log.warn(sm.getString(
- "expiresFilter.unknownParameterIgnored", name,
- value));
+ CatalinaLogger.FILTERS_LOGGER.expiresUnknownParameter(name, value);
}
} catch (RuntimeException e) {
- throw new ServletException(sm.getString(
- "expiresFilter.exceptionProcessingParameter", name,
- value), e);
+ throw new ServletException(MESSAGES.expiresExceptionProcessingParameter(name, value), e);
}
}
-
- log.debug(sm.getString("expiresFilter.filterInitialized",
- this.toString()));
}
/**
@@ -1359,24 +1347,13 @@
boolean expirationHeaderHasBeenSet = response.containsHeader(HEADER_EXPIRES) ||
contains(response.getCacheControlHeader(), "max-age");
if (expirationHeaderHasBeenSet) {
- if (log.isDebugEnabled()) {
- log.debug(sm.getString(
- "expiresFilter.expirationHeaderAlreadyDefined",
- request.getRequestURI(),
- Integer.valueOf(response.getStatus()),
- response.getContentType()));
- }
+ CatalinaLogger.FILTERS_LOGGER.expiresHeaderAlreadyDefined(request.getRequestURI(), response.getStatus(), response.getContentType());
return false;
}
for (int skippedStatusCode : this.excludedResponseStatusCodes) {
if (response.getStatus() == skippedStatusCode) {
- if (log.isDebugEnabled()) {
- log.debug(sm.getString("expiresFilter.skippedStatusCode",
- request.getRequestURI(),
- Integer.valueOf(response.getStatus()),
- response.getContentType()));
- }
+ CatalinaLogger.FILTERS_LOGGER.expiresSkipStatusCode(request.getRequestURI(), response.getStatus(), response.getContentType());
return false;
}
}
@@ -1440,8 +1417,7 @@
try {
currentToken = tokenizer.nextToken();
} catch (NoSuchElementException e) {
- throw new IllegalStateException(sm.getString(
- "expiresFilter.startingPointNotFound", line));
+ throw MESSAGES.expiresStartingPointNotFound(line);
}
StartingPoint startingPoint;
@@ -1463,15 +1439,13 @@
tokenizer = new StringTokenizer(currentToken.substring(1) +
" seconds", " ");
} else {
- throw new IllegalStateException(sm.getString(
- "expiresFilter.startingPointInvalid", currentToken, line));
+ throw MESSAGES.expiresInvalidStartingPoint(currentToken, line);
}
try {
currentToken = tokenizer.nextToken();
} catch (NoSuchElementException e) {
- throw new IllegalStateException(sm.getString(
- "Duration not found in directive '{}'", line));
+ throw MESSAGES.expiresDurationNotFound(line);
}
if ("plus".equalsIgnoreCase(currentToken)) {
@@ -1479,8 +1453,7 @@
try {
currentToken = tokenizer.nextToken();
} catch (NoSuchElementException e) {
- throw new IllegalStateException(sm.getString(
- "Duration not found in directive '{}'", line));
+ throw MESSAGES.expiresDurationNotFound(line);
}
}
@@ -1491,18 +1464,13 @@
try {
amount = Integer.parseInt(currentToken);
} catch (NumberFormatException e) {
- throw new IllegalStateException(sm.getString(
- "Invalid duration (number) '{}' in directive '{}'",
- currentToken, line));
+ throw MESSAGES.expiresInvalidDuration(currentToken, line);
}
try {
currentToken = tokenizer.nextToken();
} catch (NoSuchElementException e) {
- throw new IllegalStateException(
- sm.getString(
- "Duration unit not found after amount {} in directive '{}'",
- Integer.valueOf(amount), line));
+ throw MESSAGES.expiresDurationUnitNotFound(amount, line);
}
DurationUnit durationUnit;
if ("years".equalsIgnoreCase(currentToken)) {
@@ -1526,10 +1494,7 @@
"seconds".equalsIgnoreCase(currentToken)) {
durationUnit = DurationUnit.SECOND;
} else {
- throw new IllegalStateException(
- sm.getString(
- "Invalid duration unit (years|months|weeks|days|hours|minutes|seconds) '{}' in directive '{}'",
- currentToken, line));
+ throw MESSAGES.expiresInvalidDurationUnit(currentToken, line);
}
Duration duration = new Duration(amount, durationUnit);
Modified: trunk/src/main/java/org/apache/catalina/filters/FilterBase.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/filters/FilterBase.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/filters/FilterBase.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -17,6 +17,8 @@
package org.apache.catalina.filters;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.util.Enumeration;
import javax.servlet.Filter;
@@ -24,10 +26,9 @@
import javax.servlet.ServletException;
import org.apache.tomcat.util.IntrospectionUtils;
-import org.apache.catalina.util.StringManager;
/**
- * Base class for filters that provides generic initialisation and a simple
+ * Base class for filters that provides generic initialization and a simple
* no-op destruction.
*
* @author xxd
@@ -35,17 +36,13 @@
*/
public abstract class FilterBase implements Filter {
- protected static final StringManager sm =
- StringManager.getManager(Constants.Package);
-
public void init(FilterConfig filterConfig) throws ServletException {
Enumeration<String> paramNames = filterConfig.getInitParameterNames();
while (paramNames.hasMoreElements()) {
String paramName = paramNames.nextElement();
if (!IntrospectionUtils.setProperty(this, paramName,
filterConfig.getInitParameter(paramName))) {
- filterConfig.getServletContext().log(sm.getString("filterbase.noSuchProperty",
- paramName, this.getClass().getName()));
+ filterConfig.getServletContext().log(MESSAGES.propertyNotFound(paramName, this.getClass().getName()));
}
}
}
Deleted: trunk/src/main/java/org/apache/catalina/filters/LocalStrings.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/filters/LocalStrings.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/filters/LocalStrings.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,35 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-
-filterbase.noSuchProperty=The property "{0}" is not defined for filters of type "{1}"
-
-http.403=Access to the specified resource ({0}) has been forbidden.
-
-csrfPrevention.invalidRandomClass=Unable to create Random source using class [{0}]
-
-expiresFilter.noExpirationConfigured=Request "{0}" with response status "{1}" content-type "{2}", no expiration configured
-expiresFilter.setExpirationDate=Request "{0}" with response status "{1}" content-type "{2}", set expiration date {3}
-expiresFilter.startingPointNotFound=Starting point (access|now|modification|a<seconds>|m<seconds>) not found in directive "{0}"
-expiresFilter.startingPointInvalid=Invalid starting point (access|now|modification|a<seconds>|m<seconds>) "{0}" in directive "{1}"
-expiresFilter.responseAlreadyCommited=Request "{0}", can not apply ExpiresFilter on already committed response.
-expiresFilter.noExpirationConfiguredForContentType=No Expires configuration found for content-type "{0}"
-expiresFilter.useMatchingConfiguration=Use {0} matching "{1}" for content-type "{2}" returns {3}
-expiresFilter.useDefaultConfiguration=Use default {0} for content-type "{1}" returns {2}
-expiresFilter.unsupportedStartingPoint=Unsupported startingPoint "{0}"
-expiresFilter.unknownParameterIgnored=Unknown parameter "{0}" with value "{1}" is ignored !
-expiresFilter.exceptionProcessingParameter=Exception processing configuration parameter "{0}":"{1}"
-expiresFilter.filterInitialized=Filter initialized with configuration {0}
-expiresFilter.expirationHeaderAlreadyDefined=Request "{0}" with response status "{1}" content-type "{2}", expiration header already defined
-expiresFilter.skippedStatusCode=Request "{0}" with response status "{1}" content-type "{1}", skip expiration header generation for given status
Deleted: trunk/src/main/java/org/apache/catalina/filters/LocalStrings_es.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/filters/LocalStrings_es.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/filters/LocalStrings_es.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,16 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-
-http.403=El acceso al recurso especificado ({0}) ha sido prohibido.
Deleted: trunk/src/main/java/org/apache/catalina/filters/LocalStrings_fr.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/filters/LocalStrings_fr.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/filters/LocalStrings_fr.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,16 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-
-http.403=L''acc\u00e8s \u00e0 la ressource demand\u00e9e ({0}) a \u00e9t\u00e9 interdit.
Modified: trunk/src/main/java/org/apache/catalina/filters/RequestFilter.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/filters/RequestFilter.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/filters/RequestFilter.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -19,6 +19,8 @@
package org.apache.catalina.filters;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.IOException;
import java.util.ArrayList;
import java.util.regex.Pattern;
@@ -209,10 +211,7 @@
try {
reList.add(Pattern.compile(pattern));
} catch (PatternSyntaxException e) {
- IllegalArgumentException iae = new IllegalArgumentException
- (sm.getString("requestFilterFilter.syntax", pattern));
- iae.initCause(e);
- throw iae;
+ throw MESSAGES.requestFilterInvalidPattern(pattern, e);
}
list = list.substring(comma + 1);
}
@@ -305,7 +304,7 @@
private void sendErrorWhenNotHttp(ServletResponse response)
throws IOException {
response.setContentType(PLAIN_TEXT_MIME_TYPE);
- response.getWriter().write(sm.getString("http.403"));
+ response.getWriter().write(MESSAGES.http403());
response.getWriter().flush();
}
Deleted: trunk/src/main/java/org/apache/catalina/manager/Constants.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/manager/Constants.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/manager/Constants.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.apache.catalina.manager;
-
-
-public class Constants {
-
- public static final String Package = "org.apache.catalina.manager";
-
- public static final String HTML_HEADER_SECTION =
- "<html>\n" +
- "<head>\n" +
- "<link href=\"{0}/jbossweb.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
-
- public static final String BODY_HEADER_SECTION =
- "<title>{1}</title>\n" +
- "</head>\n" +
- "\n" +
- "<body>\n" +
- "\n" +
- "<div class=\"wrapper\">\n" +
- " <div class=\"header\">\n" +
- " <div class=\"floatleft\"><a href=\"list\"><img src=\"{0}/images/hdr_hdrtitle.gif\" border=\"0\"></a></div>\n" +
- " <div class=\"floatright\"><a href=\"http://www.jboss.com/\"><img src=\"{0}/images/hdr_jbosslogo.gif\" alt=\"JBoss, a division of Red Hat\" border=\"0\"></a><a href=\"http://www.jboss.org\"><img src=\"{0}/images/hdr_jbossorglogo.gif\" alt=\"JBoss.org - Community driven.\" border=\"0\" /></a></div>\n" +
- " </div>\n" +
- " <div class=\"container\">\n" +
- "\n";
-
- public static final String MESSAGE_SECTION =
- "<table border=\"0\" class=\"message\"><tbody>\n" +
- " <tr>\n" +
- " <td width=\"10%\"><strong>{0}</strong></td>" +
- " <td>{1}</td>\n" +
- " </tr>\n" +
- "</tbody></table>\n" +
- "\n";
-
- public static final String MANAGER_SECTION =
- "<div class=\"leftcol\"><dl>\n" +
- " <dt>Manager</dt>" +
- " <dd><a href=\"{1}\">{2}</a></dd>" +
- " <dd><a href=\"{3}\">{4}</a></dd>" +
- " <dd><a href=\"{5}\">{6}</a></dd>" +
- " <dd><a href=\"{7}\">{8}</a></dd>" +
- "</dl></div>\n" +
- "<div class=\"maincol\">\n";
-
- public static final String MANAGER_STATUS_SECTION1 =
- "<div class=\"leftcol\"><dl>\n" +
- " <dt>Manager</dt>" +
- " <dd><a href=\"{1}\">{2}</a></dd>" +
- " <dd><a href=\"{3}\">{4}</a></dd>" +
- " <dd><a href=\"{5}\">{6}</a></dd>" +
- " <dd><a href=\"{7}\">{8}</a></dd>";
-
- public static final String MANAGER_STATUS_SECTION2 =
- "</dl></div>\n" +
- "<div class=\"maincol\">\n";
-
- public static final String SERVER_HEADER_SECTION =
- "<table width=\"100%\" cellspacing=\"0\" class=\"tableStyle\" >\n" +
- "<thead>\n" +
- " <th colspan=\"6\">{0}</th>\n" +
- "</thead>\n" +
- "<tr class=\"UnsortableTableHeader\">\n" +
- " <td>{1}</td>\n" +
- " <td>{2}</td>\n" +
- " <td>{3}</td>\n" +
- " <td>{4}</td>\n" +
- " <td>{5}</td>\n" +
- " <td>{6}</td>\n" +
- "</tr>\n";
-
- public static final String SERVER_ROW_SECTION =
- "<tbody><tr class=\"oddRow\">\n" +
- " <td class=\"first\">{0}</small></td>\n" +
- " <td>{1}</td>\n" +
- " <td>{2}</td>\n" +
- " <td>{3}</td>\n" +
- " <td>{4}</td>\n" +
- " <td>{5}</td>\n" +
- "</tr>\n" +
- "</tbody></table>\n" +
- "\n";
-
- public static final String HTML_TAIL_SECTION =
- " </div>\n" +
- " </div>\n" +
- " <div class=\"footer\">© 2008 Red Hat Middleware, LLC. All Rights Reserved. </div>\n" +
- "</div></body></html>";
-
- public static final String CHARSET="utf-8";
-
- public static final String XML_DECLARATION =
- "<?xml version=\"1.0\" encoding=\""+CHARSET+"\"?>";
-
- public static final String XML_STYLE =
- "<?xml-stylesheet type=\"text/xsl\" href=\"xform.xsl\" ?>";
-
-}
-
Deleted: trunk/src/main/java/org/apache/catalina/manager/LocalStrings.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/manager/LocalStrings.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/manager/LocalStrings.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,89 +0,0 @@
-htmlManagerServlet.appsAvailable=Running
-htmlManagerServlet.appsName=Display Name
-htmlManagerServlet.appsPath=Path
-htmlManagerServlet.appsReload=Reload
-htmlManagerServlet.appsUndeploy=Undeploy
-htmlManagerServlet.appsExpire=Expire sessions
-htmlManagerServlet.appsSessions=Sessions
-htmlManagerServlet.appsStart=Start
-htmlManagerServlet.appsStop=Stop
-htmlManagerServlet.appsTasks=Commands
-htmlManagerServlet.appsTitle=Applications
-htmlManagerServlet.expire.explain=with idle ≥
-htmlManagerServlet.expire.unit=minutes
-htmlManagerServlet.helpHtmlManager=HTML Manager Help
-htmlManagerServlet.helpHtmlManagerFile=../docs/html-manager-howto.html
-htmlManagerServlet.helpManager=Manager Help
-htmlManagerServlet.helpManagerFile=../docs/manager-howto.html
-htmlManagerServlet.deployButton=Deploy
-htmlManagerServlet.deployConfig=XML Configuration file URL:
-htmlManagerServlet.deployPath=Context Path (required):
-htmlManagerServlet.deployServer=Deploy directory or WAR file located on server
-htmlManagerServlet.deployTitle=Deploy
-htmlManagerServlet.deployUpload=WAR file to deploy
-htmlManagerServlet.deployUploadFail=FAIL - Deploy Upload Failed, Exception: {0}
-htmlManagerServlet.deployUploadFile=Select WAR file to upload
-htmlManagerServlet.deployUploadInServerXml=FAIL - War file \"{0}\" cannot be uploaded if context is defined in server.xml
-htmlManagerServlet.deployUploadNotWar=FAIL - File uploaded \"{0}\" must be a .war
-htmlManagerServlet.deployUploadNoFile=FAIL - File upload failed, no file
-htmlManagerServlet.deployUploadWarExists=FAIL - War file \"{0}\" already exists on server
-htmlManagerServlet.deployWar=WAR or Directory URL:
-htmlManagerServlet.list=List Applications
-htmlManagerServlet.manager=Manager
-htmlManagerServlet.messageLabel=Message:
-htmlManagerServlet.noManager=-
-htmlManagerServlet.serverJVMVendor=JVM Vendor
-htmlManagerServlet.serverJVMVersion=JVM Version
-htmlManagerServlet.serverOSArch=OS Architecture
-htmlManagerServlet.serverOSName=OS Name
-htmlManagerServlet.serverOSVersion=OS Version
-htmlManagerServlet.serverTitle=Server Information
-htmlManagerServlet.serverVersion=Tomcat Version
-htmlManagerServlet.title=Tomcat Web Application Manager
-managerServlet.alreadyContext=FAIL - Application already exists at path {0}
-managerServlet.alreadyDocBase=FAIL - Directory {0} is already in use
-managerServlet.cannotInvoke=Cannot invoke manager servlet through invoker
-managerServlet.configured=OK - Deployed application from context file {0}
-managerServlet.deployed=OK - Deployed application at context path {0}
-managerServlet.deployedButNotStarted=FAIL - Deployed application at context path {0} but context failed to start
-managerServlet.deployFailed=FAIL - Failed to deploy application at context path {0}
-managerServlet.exception=FAIL - Encountered exception {0}
-managerServlet.deployed=OK - Deployed application at context path {0}
-managerServlet.invalidPath=FAIL - Invalid context path {0} was specified
-managerServlet.invalidWar=FAIL - Invalid application URL {0} was specified
-managerServlet.listed=OK - Listed applications for virtual host {0}
-managerServlet.listitem={0}:{1}:{2}:{3}
-managerServlet.noAppBase=FAIL - Cannot identify application base for context path {0}
-managerServlet.noCommand=FAIL - No command was specified
-managerServlet.noContext=FAIL - No context exists for path {0}
-managerServlet.noDirectory=FAIL - Non-directory document base for path {0}
-managerServlet.noDocBase=FAIL - Cannot undeploy document base for path {0}
-managerServlet.noGlobal=FAIL - No global JNDI resources are available
-managerServlet.noManager=FAIL - No manager exists for path {0}
-managerServlet.noReload=FAIL - Reload not supported on WAR deployed at path {0}
-managerServlet.noRename=FAIL - Cannot deploy uploaded WAR for path {0}
-managerServlet.noRole=FAIL - User does not possess role {0}
-managerServlet.noSelf=FAIL - The manager can not reload, undeploy, stop, or undeploy itself
-managerServlet.noWrapper=Container has not called setWrapper() for this servlet
-managerServlet.notDeployed=FAIL - Context {0} is defined in server.xml and may not be undeployed
-managerServlet.reloaded=OK - Reloaded application at context path {0}
-managerServlet.undeployd=OK - Undeployed application at context path {0}
-managerServlet.resourcesAll=OK - Listed global resources of all types
-managerServlet.resourcesType=OK - Listed global resources of type {0}
-managerServlet.rolesList=OK - Listed security roles
-managerServlet.saveFail=FAIL - Configuration save failed: {0}
-managerServlet.saved=OK - Server configuration saved
-managerServlet.savedContext=OK - Context {0} configuration saved
-managerServlet.sessiondefaultmax=Default maximum session inactive interval {0} minutes
-managerServlet.sessiontimeout={0} minutes:{1} sessions
-managerServlet.sessions=OK - Session information for application at context path {0}
-managerServlet.started=OK - Started application at context path {0}
-managerServlet.startFailed=FAIL - Application at context path {0} could not be started
-managerServlet.stopped=OK - Stopped application at context path {0}
-managerServlet.undeployed=OK - Undeployed application at context path {0}
-managerServlet.unknownCommand=FAIL - Unknown command {0}
-managerServlet.userDatabaseError=FAIL - Cannot resolve user database reference
-managerServlet.userDatabaseMissing=FAIL - No user database is available
-
-statusServlet.title=Server Status
-statusServlet.complete=Complete Server Status
Deleted: trunk/src/main/java/org/apache/catalina/manager/LocalStrings_de.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/manager/LocalStrings_de.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/manager/LocalStrings_de.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,81 +0,0 @@
-htmlManagerServlet.appsAvailable=Verf�gbar
-htmlManagerServlet.appsName=Anzeigename
-htmlManagerServlet.appsPath=Kontext Pfad
-htmlManagerServlet.appsReload=Neu laden
-htmlManagerServlet.appsUndeploy=Entfernen
-htmlManagerServlet.appsExpire=L�sche Sitzungen
-htmlManagerServlet.appsSessions=Sitzungen
-htmlManagerServlet.appsStart=Start
-htmlManagerServlet.appsStop=Stop
-htmlManagerServlet.appsTasks=Kommandos
-htmlManagerServlet.appsTitle=Anwendungen
-htmlManagerServlet.expire.explain=mit Inaktivit�t ≥
-htmlManagerServlet.expire.unit=Minuten
-htmlManagerServlet.helpHtmlManager=Hilfeseite HTML Manager (englisch)
-htmlManagerServlet.helpHtmlManagerFile=html-manager-howto.html
-htmlManagerServlet.helpManager=Hilfeseite Manager (englisch)
-htmlManagerServlet.helpManagerFile=manager-howto.html
-htmlManagerServlet.deployButton=Installieren
-htmlManagerServlet.deployConfig=XML Konfigurationsdatei URL:
-htmlManagerServlet.deployPath=Kontext Pfad (optional):
-htmlManagerServlet.deployServer=Verzeichnis oder WAR Datei auf Server installieren
-htmlManagerServlet.deployTitle=Installieren
-htmlManagerServlet.deployUpload=Lokale WAR Datei zur Installation hochladen
-htmlManagerServlet.deployUploadFail=FEHLER - Hochladen zur Installation fehlgeschlagen, Ausnahme: {0}
-htmlManagerServlet.deployUploadFile=WAR Datei ausw�hlen
-htmlManagerServlet.deployUploadNotWar=FEHLER - Hochgeladene Datei \"{0}\" muss ein .war sein
-htmlManagerServlet.deployUploadNoFile=FEHLER - Hochladen fehlgeschlagen, keine Datei vorhanden
-htmlManagerServlet.deployUploadWarExists=FEHLER - WAR Datei \"{0}\" existiert bereits auf Server
-htmlManagerServlet.deployWar=WAR oder Verzeichnis URL:
-htmlManagerServlet.list=Anwendungen auflisten
-htmlManagerServlet.manager=Manager
-htmlManagerServlet.messageLabel=Nachricht:
-htmlManagerServlet.serverJVMVendor=JVM Hersteller
-htmlManagerServlet.serverJVMVersion=JVM Version
-htmlManagerServlet.serverOSArch=OS Architektur
-htmlManagerServlet.serverOSName=OS Name
-htmlManagerServlet.serverOSVersion=OS Version
-htmlManagerServlet.serverTitle=Server Informationen
-htmlManagerServlet.serverVersion=Tomcat Version
-htmlManagerServlet.title=Tomcat Webanwendungs-Manager
-managerServlet.alreadyContext=FEHLER - Anwendung existiert bereits f�r Kontext Pfad {0}
-managerServlet.alreadyDocBase=FEHLER - Verzeichnis {0} bereits in Benutzung
-managerServlet.cannotInvoke=Kann Manager-Servlet nicht durch Invoker aufrufen
-managerServlet.configured=OK - Anwendung von Kontext-Datei {0} installiert
-managerServlet.deployed=OK - Anwendung mit Kontext Pfad {0} installiert
-managerServlet.exception=FEHLER - Ausnahme aufgetreten {0}
-managerServlet.deployed=OK - Anwendung mit Kontext Pfad {0} installiert
-managerServlet.invalidPath=FEHLER - Ung�ltiger Kontext Pfad {0} angegeben
-managerServlet.invalidWar=FEHLER - Ung�ltige URL {0} f�r Anwendung angegeben
-managerServlet.listed=OK - Auflistung der Webanwendungen f�r virtuellen Server {0}
-managerServlet.listitem={0}:{1}:{2}:{3}
-managerServlet.noAppBase=FEHLER - Kann Verzeichnis f�r Kontext Pfad {0} nicht finden
-managerServlet.noCommand=FEHLER - Es wurde kein Kommando angegeben
-managerServlet.noContext=FEHLER - Es existiert kein Kontext f�r Pfad {0}
-managerServlet.noDirectory=FEHLER - Pfad {0} ist kein Verzeichnis
-managerServlet.noDocBase=FEHLER - Kann Webanwendungs-Verzeichnis nicht entfernen f�r Kontext Pfad {0}
-managerServlet.noGlobal=FEHLER - Keine globalen JNDI Ressourcen verf�gbar
-managerServlet.noReload=FEHLER - Neu laden nicht unterst�tzt f�r WAR mit Pfad {0}
-managerServlet.noRename=FEHLER - Kann hochgeladenes WAR mit Pfad {0} nicht installieren
-managerServlet.noRole=FEHLER - Benutzer nicht in Rolle {0}
-managerServlet.noSelf=FEHLER - Manager-Kommandos k�nnen nicht auf die Manager-Anwendung selbst angewendet werden
-managerServlet.noWrapper=Container hat setWrapper() f�r dieses Servlet nicht aufgerufen
-managerServlet.reloaded=OK - Anwendung mit Kontext Pfad {0} neu geladen
-managerServlet.undeployd=OK - Anwendung mit Kontext Pfad {0} entfernt
-managerServlet.resourcesAll=OK - Auflistung globaler Ressourcen (alle Typen)
-managerServlet.resourcesType=OK - Auflistung globaler Ressourcen von Typ {0}
-managerServlet.rolesList=OK - Auflistung der Sicherheits-Rollen
-managerServlet.saveFail=FEHLER - Speichern der Konfiguration fehlgeschlagen: {0}
-managerServlet.sessiondefaultmax=Voreingestellter Sitzungsablauf nach maximal {0} Minuten Inaktivit�t
-managerServlet.sessiontimeout={0} Minuten: {1} Sitzungen
-managerServlet.sessions=OK - Sitzungs-Informationen f�r Anwendung mit Kontext Pfad {0}
-managerServlet.started=OK - Anwendung mit Kontext Pfad {0} gestartet
-managerServlet.startFailed=FEHLER - Anwendung mit Kontext Pfad {0} konnte nicht gestartet werden
-managerServlet.stopped=OK - Anwendung mit Kontext Pfad {0} gestoppt
-managerServlet.undeployed=OK - Anwendung mit Kontext Pfad {0} entfernt
-managerServlet.unknownCommand=FEHLER - Unbekanntes Kommando {0}
-managerServlet.userDatabaseError=FEHLER - Kann Referenz auf Benutzerdatendank nicht aufl�sen
-managerServlet.userDatabaseMissing=FEHLER - Keine Benutzerdatenbank vorhanden
-
-statusServlet.title=Server Status
-statusServlet.complete=Ausf�hrlicher Server Status
Deleted: trunk/src/main/java/org/apache/catalina/manager/LocalStrings_es.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/manager/LocalStrings_es.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/manager/LocalStrings_es.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,101 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-htmlManagerServlet.appsAvailable = Ejecut\u00E1ndose
-htmlManagerServlet.appsName = Nombre a Mostrar
-htmlManagerServlet.appsPath = Trayectoria
-htmlManagerServlet.appsReload = Recargar
-htmlManagerServlet.appsUndeploy = Replegar
-htmlManagerServlet.appsExpire = Expirar sesiones
-htmlManagerServlet.appsSessions = Sesiones
-htmlManagerServlet.appsStart = Arrancar
-htmlManagerServlet.appsStop = Parar
-htmlManagerServlet.appsTasks = Comandos
-htmlManagerServlet.appsTitle = Aplicaciones
-htmlManagerServlet.expire.explain = sin trabajar ≥
-htmlManagerServlet.expire.unit = minutos
-htmlManagerServlet.helpHtmlManager = Ayuda HTML de Gestor
-htmlManagerServlet.helpHtmlManagerFile = html-manager-howto.html
-htmlManagerServlet.helpManager = Ayuda de Gestor
-htmlManagerServlet.helpManagerFile = manager-howto.html
-htmlManagerServlet.deployButton = Desplegar
-htmlManagerServlet.deployConfig = URL de archivo de Configuraci\u00F3n XML\:
-htmlManagerServlet.deployPath = Trayectoria de Contexto (opcional)\:
-htmlManagerServlet.deployServer = Desplegar directorio o archivo WAR localizado en servidor
-htmlManagerServlet.deployTitle = Desplegar
-htmlManagerServlet.deployUpload = Archivo WAR a desplegar
-htmlManagerServlet.deployUploadFail = FALLO - Fall\u00F3 Carga de Despliegue, Excepci\u00F3n\: {0}
-htmlManagerServlet.deployUploadFile = Seleccione archivo WAR a cargar
-htmlManagerServlet.deployUploadInServerXml = FALLO - El fichero war "{0}" no se puede cargar si se define el contexto en server.xml
-htmlManagerServlet.deployUploadNotWar = FALLO - El fichero cargado "{0}" debe de ser un .war
-htmlManagerServlet.deployUploadNoFile = FALLO - Fall\u00F3 la carga del fichero, no hay fichero
-htmlManagerServlet.deployUploadWarExists = FALLO - El fichero war "{0}" ya existe en el servidor
-htmlManagerServlet.deployWar = URL de WAR o Directorio\:
-htmlManagerServlet.list = Listar Aplicaciones
-htmlManagerServlet.manager = Gestor
-htmlManagerServlet.messageLabel = Mensaje\:
-htmlManagerServlet.noManager = -
-htmlManagerServlet.serverJVMVendor = Vendedor JVM
-htmlManagerServlet.serverJVMVersion = Versi\u00F3n JVM
-htmlManagerServlet.serverOSArch = Arquitectura de SO
-htmlManagerServlet.serverOSName = Nombre de SO
-htmlManagerServlet.serverOSVersion = Versi\u00F3n de SO
-htmlManagerServlet.serverTitle = Informaci\u00F3n de Servidor
-htmlManagerServlet.serverVersion = Versi\u00F3n de Tomcat
-htmlManagerServlet.title = Gestor de Aplicaciones Web de Tomcat
-managerServlet.alreadyContext = FALLO - Ya existe la aplicaci\u00F3n en la trayectoria {0}
-managerServlet.alreadyDocBase = FALLO - Directorio {0} ya est\u00E1 siendo usado
-managerServlet.cannotInvoke = No puedo invocar servlet de gestor a trav\u00E9s de invocador
-managerServlet.configured = OK - Desplegada aplicaci\u00F3n desde archivo de contexto {0}
-managerServlet.deployed = OK - Desplegada aplicaci\u00F3n en trayectoria de contexto {0}
-managerServlet.deployFailed = FALLO - No pude desplegar la aplicaci\u00F3n en ruta de contexto {0}
-managerServlet.exception = FALLO - Encontrada excepci\u00F3n {0}
-managerServlet.deployed = OK - Aplicaci\u00F3n desplegada en ruta de contexto {0}
-managerServlet.invalidPath = FALLO - Se ha especificado una trayectoria inv\u00E1lida de contexto {0}
-managerServlet.invalidWar = FALLO - Se ha especificado una URL de aplicaci\u00F3n inv\u00E1lida {0}
-managerServlet.listed = OK - Aplicaciones listadas para m\u00E1quinda virutal {0}
-managerServlet.listitem = {0}\:{1}\:{2}\:{3}
-managerServlet.noAppBase = FALLO - No puedo identificar aplicaci\u00F3n base para trayectoria de contexto {0}
-managerServlet.noCommand = FALLO - No se ha especificado comando
-managerServlet.noContext = FALLO - No existe contexto para trayectoria {0}
-managerServlet.noDirectory = FALLO - Documento base No-directorio para trayectoria {0}
-managerServlet.noDocBase = FALLO - No puedo replegar documento base para trayectoria {0}
-managerServlet.noGlobal = FALLO - No hay disponibles recursos globales JNDI
-managerServlet.noManager = FALLO - No existe gestor para ruta {0}
-managerServlet.noReload = FALLO - Recarga no soportada en WAR desplegado en trayectoria {0}
-managerServlet.noRename = FALLO - No pudeo desplegar WAR cargado para trayectoria {0}
-managerServlet.noRole = FALLO - El usuario no desempe\u00F1a el papel de {0}
-managerServlet.noSelf = FALLO - El gestor no puede recargarse, replegarse, pararse o replegarse a s\u00ED mismo
-managerServlet.noWrapper = El Contenedor no ha llamado a setWrapper() para este servlet
-managerServlet.notDeployed = FALLO - El contexto {0} est\u00E1 definido en server.xml y puede que no est\u00E9 desplegado
-managerServlet.reloaded = OK - Recargada aplicaci\u00F3n en trayectoria de contexto {0}
-managerServlet.undeployd = OK - Replegada aplicaci\u00F3n en trayectoria de contexto {0}
-managerServlet.resourcesAll = OK - Listados recursos globales de todos los tipos
-managerServlet.resourcesType = OK - Listados recursos globales de tipo {0}
-managerServlet.rolesList = OK - Listados papeles de seguridad
-managerServlet.saveFail = FAIL - Fallo al guardar la configuraci\u00F3n\: {0}
-managerServlet.saved = OK - Configuraci\u00F3n de Servidor guardada
-managerServlet.savedContext = OK - Configuraci\u00F3n de Contexto {0} guardada
-managerServlet.sessiondefaultmax = Intervalo m\u00E1ximo por defecto de sesi\u00F3n inactiva {0} minutos
-managerServlet.sessiontimeout = {0} minutos\: {1} sesiones
-managerServlet.sessions = OK - Informaci\u00F3n de sesi\u00F3n para aplicaci\u00F3n en trayectoria de contexto {0}
-managerServlet.started = OK - Arrancada aplicaci\u00F3n en trayectoria de contexto {0}
-managerServlet.startFailed = FALLO - No se pudo arrancar la aplicaci\u00F3n en trayectoria de contexto {0}
-managerServlet.stopped = OK - Parada aplicaci\u00F3n en trayectoria de contexto {0}
-managerServlet.undeployed = OK - Replegada aplicacaci\u00F3n en trayectoria de contexto {0}
-managerServlet.unknownCommand = FALLO - Comando desconocido {0}
-managerServlet.userDatabaseError = FALLO - No puedo resolver referencia de base de datos de usuario
-managerServlet.userDatabaseMissing = FALLO - No se encuentra disponible base de datos de usuario
-statusServlet.title = Estado de Servidor
-statusServlet.complete = Estado Completo de Servidor
Deleted: trunk/src/main/java/org/apache/catalina/manager/LocalStrings_fr.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/manager/LocalStrings_fr.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/manager/LocalStrings_fr.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,64 +0,0 @@
-htmlManagerServlet.appsAvailable=Fonctionnant
-htmlManagerServlet.appsName=Nom d''affichage
-htmlManagerServlet.appsPath=Chemin
-htmlManagerServlet.appsReload=Recharger
-htmlManagerServlet.appsRemove=Retirer
-htmlManagerServlet.appsSessions=Sessions
-htmlManagerServlet.appsStart=D�marrer
-htmlManagerServlet.appsStop=Arr�ter
-htmlManagerServlet.appsTitle=Applications
-htmlManagerServlet.installButton=Installation
-htmlManagerServlet.installConfig=URL de configuration:
-htmlManagerServlet.installPath=Chemin:
-htmlManagerServlet.installTitle=Installation
-htmlManagerServlet.installWar=URL du WAR:
-htmlManagerServlet.messageLabel=Message:
-htmlManagerServlet.serverJVMVendor=Fournisseur de la JVM
-htmlManagerServlet.serverJVMVersion=Version de la JVM
-htmlManagerServlet.serverOSArch=Architecture d''OS
-htmlManagerServlet.serverOSName=Nom d''OS
-htmlManagerServlet.serverOSVersion=Version d''OS
-htmlManagerServlet.serverTitle=Serveur
-htmlManagerServlet.serverVersion=Version de serveur
-htmlManagerServlet.title=Gestionnaire d''applications WEB Tomcat
-managerServlet.alreadyContext=ECHEC - l''application existe d�j� dans le chemin {0}
-managerServlet.alreadyDocBase=ECHEC - Le r�pertoire {0} est d�j� utilis�
-managerServlet.cannotInvoke=Impossible d''utiliser le gestionnaire de servlet au travers du d�l�gu� (invoker)
-managerServlet.configured=OK - Application configur�e depuis le fichier contexte {0}
-managerServlet.deployed=OK - Application d�ploy�e pour le chemin de contexte {0}
-managerServlet.exception=ECHEC - L''exception {0} a �t� rencontr�e
-managerServlet.installed=OK - Application install�e pour le chemin de contexte {0}
-managerServlet.invalidPath=ECHEC - Un chemin de contexte invalide {0} a �t� sp�cifi�
-managerServlet.invalidWar=ECHEC - Une URL d''application invalide {0} a �t� sp�cifi�e
-managerServlet.listed=OK - Applications list�es pour l''h�te virtuel (virtual host) {0}
-managerServlet.listitem={0}:{1}:{2}:{3}
-managerServlet.noAppBase=ECHEC - Impossible d''identifier la base de l''application base pour le chemin de context {0}
-managerServlet.noCommand=ECHEC - Aucune commande n''a �t� sp�cifi�e
-managerServlet.noContext=ECHEC - Aucune contexte n''existe pour le chemin {0}
-managerServlet.noDirectory=ECHEC - La base de document n''est pas un r�pertoire pour le chemin {0}
-managerServlet.noDocBase=ECHEC - Impossible de retirer la base de document pour le chemin {0}
-managerServlet.noGlobal=ECHEC - Aucune ressource JNDI globale n''est disponible
-managerServlet.noReload=ECHEC - Rechargement non support� par le WAR d�ploy� au chemin {0}
-managerServlet.noRename=ECHEC - Impossible de d�ployer un WAR t�l�charg� pour le chemin {0}
-managerServlet.noRole=ECHEC - L''utilisateur ne poss�de pas le r�le {0}
-managerServlet.noSelf=ECHEC - Le gestionnaire ne peut recharger, retirer, arr�ter, ou se d�ployer lui-m�me
-managerServlet.noWrapper=Le conteneur n''a pas appel� "setWrapper()" pour cette servlet
-managerServlet.reloaded=OK - Application recharg�e au chemin de contexte {0}
-managerServlet.removed=OK - Application retir�e au chemin de contexte {0}
-managerServlet.resourcesAll=OK - Liste des ressources globales de tout type
-managerServlet.resourcesType=OK - Liste des ressources globales de type {0}
-managerServlet.rolesList=OK - Liste de r�les de securit�
-managerServlet.saveFail=ECHEC - La sauvegarde de la configuration a �chou�: {0}
-managerServlet.sessiondefaultmax=Interval par d�faut de maximum de session inactive {0} minutes
-managerServlet.sessiontimeout={0} minutes:{1} sessions
-managerServlet.sessions=OK - Information de session pour l''application au chemin de contexte {0}
-managerServlet.started=OK - Application d�marr�e pour le chemin de contexte {0}
-managerServlet.startFailed=ECHEC - L''application pour le chemin de contexte {0} n''a pas pu�tred�marr�e
-managerServlet.stopped=OK - Application arr�t�e pour le chemin de contexte {0}
-managerServlet.undeployed=OK - Application non-d�ploy�e pour le chemin de contexte {0}
-managerServlet.unknownCommand=ECHEC - Commande inconnue {0}
-managerServlet.userDatabaseError=ECHEC - Impossible de r�soudre la base de donn�es utilisateurs der�f�rence
-managerServlet.userDatabaseMissing=ECHEC - Aucune base de donn�es utilisateurs n''est disponible
-
-statusServlet.title=Etat du serveur
-statusServlet.complete=Etat complet du serveur
Deleted: trunk/src/main/java/org/apache/catalina/manager/LocalStrings_ja.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/manager/LocalStrings_ja.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/manager/LocalStrings_ja.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,79 +0,0 @@
-htmlManagerServlet.appsAvailable=\u5b9f\u884c\u4e2d
-htmlManagerServlet.appsName=\u8868\u793a\u540d
-htmlManagerServlet.appsPath=\u30d1\u30b9
-htmlManagerServlet.appsReload=\u518d\u30ed\u30fc\u30c9
-htmlManagerServlet.appsUndeploy=\u914d\u5099\u89e3\u9664
-htmlManagerServlet.appsSessions=\u30bb\u30c3\u30b7\u30e7\u30f3
-htmlManagerServlet.appsStart=\u8d77\u52d5
-htmlManagerServlet.appsStop=\u505c\u6b62
-htmlManagerServlet.appsTasks=\u30b3\u30de\u30f3\u30c9
-htmlManagerServlet.appsTitle=\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3
-htmlManagerServlet.helpHtmlManager=HTML\u30de\u30cd\u30fc\u30b8\u30e3\u30d8\u30eb\u30d7
-htmlManagerServlet.helpHtmlManagerFile=html-manager-howto.html
-htmlManagerServlet.helpManager=\u30de\u30cd\u30fc\u30b8\u30e3\u30d8\u30eb\u30d7
-htmlManagerServlet.helpManagerFile=manager-howto.html
-htmlManagerServlet.deployButton=\u914d\u5099
-htmlManagerServlet.deployConfig=XML\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306eURL:
-htmlManagerServlet.deployPath=\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9 (\u7701\u7565\u53ef):
-htmlManagerServlet.deployServer=\u30b5\u30fc\u30d0\u4e0a\u306eWAR\u30d5\u30a1\u30a4\u30eb\u53c8\u306f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u914d\u5099
-htmlManagerServlet.deployTitle=\u914d\u5099
-htmlManagerServlet.deployUpload=WAR\u30d5\u30a1\u30a4\u30eb\u306e\u914d\u5099
-htmlManagerServlet.deployUploadFail=FAIL - \u914d\u5099\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u304c\u5931\u6557\u3057\u307e\u3057\u305f\u3001\u4f8b\u5916: {0}
-htmlManagerServlet.deployUploadFile=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308bWAR\u30d5\u30a1\u30a4\u30eb\u306e\u9078\u629e
-htmlManagerServlet.deployUploadNotWar=FAIL - \u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u30d5\u30a1\u30a4\u30eb \"{0}\" \u306fWAR\u30d5\u30a1\u30a4\u30eb\u3067\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093
-htmlManagerServlet.deployUploadNoFile=FAIL - \u30d5\u30a1\u30a4\u30eb\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u304c\u5931\u6557\u3057\u307e\u3057\u305f\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3057\u307e\u305b\u3093
-htmlManagerServlet.deployUploadWarExists=FAIL - WAR\u30d5\u30a1\u30a4\u30eb \"{0}\" \u306f\u65e2\u306b\u30b5\u30fc\u30d0\u4e0a\u306b\u5b58\u5728\u3057\u307e\u3059
-htmlManagerServlet.deployWar=WAR\u30d5\u30a1\u30a4\u30eb\u53c8\u306f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306eURL:
-htmlManagerServlet.list=\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u4e00\u89a7
-htmlManagerServlet.manager=\u30de\u30cd\u30fc\u30b8\u30e3
-htmlManagerServlet.messageLabel=\u30e1\u30c3\u30bb\u30fc\u30b8
-htmlManagerServlet.serverJVMVendor=JVM\u30d9\u30f3\u30c0
-htmlManagerServlet.serverJVMVersion=JVM\u30d0\u30fc\u30b8\u30e7\u30f3
-htmlManagerServlet.serverOSArch=OS\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3
-htmlManagerServlet.serverOSName=OS\u540d
-htmlManagerServlet.serverOSVersion=OS\u30d0\u30fc\u30b8\u30e7\u30f3
-htmlManagerServlet.serverTitle=\u30b5\u30fc\u30d0\u60c5\u5831
-htmlManagerServlet.serverVersion=Tomcat\u30d0\u30fc\u30b8\u30e7\u30f3
-htmlManagerServlet.title=Tomcat Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30de\u30cd\u30fc\u30b8\u30e3
-managerServlet.alreadyContext=FAIL - \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u65e2\u306b\u30d1\u30b9 {0} \u306b\u5b58\u5728\u3057\u307e\u3059
-managerServlet.alreadyDocBase=FAIL - \u30c7\u30a3\u30ec\u30af\u30c8\u30ea {0} \u306f\u65e2\u306b\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059
-managerServlet.cannotInvoke=\u30a4\u30f3\u30dc\u30fc\u30ab\u3067\u30de\u30cd\u30fc\u30b8\u30e3\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3092\u8d77\u52d5\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f
-managerServlet.configured=OK - \u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb {0} \u304b\u3089\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f
-managerServlet.deployed=OK - \u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9 {0} \u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u914d\u5099\u3057\u307e\u3057\u305f
-managerServlet.exception=FAIL - \u4f8b\u5916 {0} \u304c\u767a\u751f\u3057\u307e\u3057\u305f
-managerServlet.deployed=OK - \u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9 {0} \u306b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f
-managerServlet.invalidPath=FAIL - \u7121\u52b9\u306a\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9 {0} \u304c\u6307\u5b9a\u3055\u308c\u307e\u3057\u305f
-managerServlet.invalidWar=FAIL - \u7121\u52b9\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eURL {0} \u304c\u6307\u5b9a\u3055\u308c\u307e\u3057\u305f
-managerServlet.listed=OK - \u30d0\u30fc\u30c1\u30e3\u30eb\u30db\u30b9\u30c8 {0} \u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u4e00\u89a7\u3067\u3059
-managerServlet.listitem={0}:{1}:{2}:{3}
-managerServlet.noAppBase=FAIL - \u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9 {0} \u306b\u5bfe\u3057\u3066\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d9\u30fc\u30b9\u3092\u78ba\u8a8d\u3067\u304d\u307e\u305b\u3093
-managerServlet.noCommand=FAIL - \u30b3\u30de\u30f3\u30c9\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-managerServlet.noContext=FAIL - \u30d1\u30b9 {0} \u306e\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u304c\u5b58\u5728\u3057\u307e\u305b\u3093
-managerServlet.noDirectory=FAIL - \u30d1\u30b9 {0} \u306b\u5bfe\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30d9\u30fc\u30b9\u304c\u3042\u308a\u307e\u305b\u3093
-managerServlet.noDocBase=FAIL - \u30d1\u30b9 {0} \u306b\u5bfe\u3059\u308b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30d9\u30fc\u30b9\u3092\u524a\u9664\u3067\u304d\u307e\u305b\u3093
-managerServlet.noGlobal=FAIL - \u30b0\u30ed\u30fc\u30d0\u30eb\u306aJNDI\u30ea\u30bd\u30fc\u30b9\u304c\u5229\u7528\u3067\u304d\u307e\u305b\u3093
-managerServlet.noReload=FAIL - \u30d1\u30b9 {0} \u306b\u914d\u5099\u3055\u308c\u305fWAR\u30d5\u30a1\u30a4\u30eb\u3067\u306f\u518d\u30ed\u30fc\u30c9\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-managerServlet.noRename=FAIL - \u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3055\u308c\u305fWAR\u30d5\u30a1\u30a4\u30eb\u3092\u30d1\u30b9 {0} \u306b\u914d\u5099\u3067\u304d\u307e\u305b\u3093
-managerServlet.noRole=FAIL - \u30e6\u30fc\u30b6\u306f\u30ed\u30fc\u30eb {0} \u3092\u6301\u3063\u3066\u3044\u307e\u305b\u3093
-managerServlet.noSelf=FAIL - \u30de\u30cd\u30fc\u30b8\u30e3\u81ea\u8eab\u3092\u518d\u30ed\u30fc\u30c9\u3001\u524a\u9664\u3001\u505c\u6b62\u3001\u53c8\u306f\u914d\u5099\u89e3\u9664\u3067\u304d\u307e\u305b\u3093
-managerServlet.noWrapper=\u30b3\u30f3\u30c6\u30ca\u306f\u3053\u306e\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u547c\u3073\u51fa\u3055\u308c\u305fsetWrapper()\u3092\u6301\u3063\u3066\u3044\u307e\u305b\u3093
-managerServlet.reloaded=OK - \u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9 {0} \u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u518d\u30ed\u30fc\u30c9\u3057\u307e\u3057\u305f
-managerServlet.undeployd=OK - \u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9 {0} \u304b\u3089\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u914d\u5099\u89e3\u9664\u3057\u307e\u3057\u305f
-managerServlet.resourcesAll=OK - \u3059\u3079\u3066\u306e\u30bf\u30a4\u30d7\u306e\u30b0\u30ed\u30fc\u30d0\u30eb\u30ea\u30bd\u30fc\u30b9\u3092\u5217\u6319\u3057\u307e\u3057\u305f
-managerServlet.resourcesType=OK - \u30bf\u30a4\u30d7 {0} \u306e\u30b0\u30ed\u30fc\u30d0\u30eb\u30ea\u30bd\u30fc\u30b9\u3092\u5217\u6319\u3057\u307e\u3057\u305f
-managerServlet.rolesList=OK - \u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ed\u30fc\u30eb\u3092\u5217\u6319\u3057\u307e\u3057\u305f
-managerServlet.saveFail=FAIL - \u8a2d\u5b9a\u306e\u4fdd\u5b58\u306b\u5931\u6557\u3057\u307e\u3057\u305f: {0}
-managerServlet.saved=OK - \u30b5\u30fc\u30d0\u306e\u8a2d\u5b9a\u3092\u4fdd\u5b58\u3057\u307e\u3057\u305f
-managerServlet.savedContext=OK - \u30b3\u30f3\u30c6\u30ad\u30b9\u30c8 {0} \u306e\u8a2d\u5b9a\u3092\u4fdd\u5b58\u3057\u307e\u3057\u305f
-managerServlet.sessiondefaultmax=\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u6700\u5927\u30bb\u30c3\u30b7\u30e7\u30f3\u505c\u6b62\u9593\u9694\u306f{0}\u5206\u3067\u3059
-managerServlet.sessiontimeout={0}\u5206: {1}\u30bb\u30c3\u30b7\u30e7\u30f3
-managerServlet.sessions=OK - \u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9 {0} \u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30bb\u30c3\u30b7\u30e7\u30f3\u60c5\u5831\u3067\u3059
-managerServlet.started=OK - \u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9 {0} \u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u8d77\u52d5\u3057\u307e\u3057\u305f
-managerServlet.startFailed=FAIL - \u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9 {0} \u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u8d77\u52d5\u3067\u304d\u307e\u305b\u3093
-managerServlet.stopped=OK - \u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9 {0} \u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u505c\u6b62\u3057\u307e\u3057\u305f
-managerServlet.undeployed=OK - \u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9 {0} \u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u914d\u5099\u89e3\u9664\u3057\u307e\u3057\u305f
-managerServlet.unknownCommand=FAIL - \u672a\u77e5\u306e\u30b3\u30de\u30f3\u30c9 {0} \u3067\u3059
-managerServlet.userDatabaseError=FAIL - \u30e6\u30fc\u30b6\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u53c2\u7167\u3092\u89e3\u6c7a\u3067\u304d\u307e\u305b\u3093
-managerServlet.userDatabaseMissing=FAIL - \u30e6\u30fc\u30b6\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u5229\u7528\u3067\u304d\u307e\u305b\u3093
-statusServlet.title=\u30b5\u30fc\u30d0\u306e\u72b6\u614b
-statusServlet.complete=\u30b5\u30fc\u30d0\u306e\u5168\u72b6\u614b
Deleted: trunk/src/main/java/org/apache/catalina/manager/StatusManagerServlet.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/manager/StatusManagerServlet.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/manager/StatusManagerServlet.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,375 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.apache.catalina.manager;
-
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.Vector;
-
-import javax.management.MBeanServer;
-import javax.management.MBeanServerNotification;
-import javax.management.Notification;
-import javax.management.NotificationListener;
-import javax.management.ObjectInstance;
-import javax.management.ObjectName;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.catalina.util.ServerInfo;
-import org.apache.catalina.util.StringManager;
-import org.apache.tomcat.util.modeler.Registry;
-
-/**
- * This servlet will display a complete status of the HTTP/1.1 connector.
- *
- * @author Remy Maucherat
- * @version $Revision: 515 $ $Date: 2008-03-17 22:02:23 +0100 (Mon, 17 Mar 2008) $
- */
-
-public class StatusManagerServlet
- extends HttpServlet implements NotificationListener {
-
-
- // ----------------------------------------------------- Instance Variables
-
-
- /**
- * The debugging detail level for this servlet.
- */
- private int debug = 0;
-
-
- /**
- * MBean server.
- */
- protected MBeanServer mBeanServer = null;
-
-
- /**
- * Vector of protocol handlers object names.
- */
- protected Vector protocolHandlers = new Vector();
-
-
- /**
- * Vector of thread pools object names.
- */
- protected Vector threadPools = new Vector();
-
-
- /**
- * Vector of request processors object names.
- */
- protected Vector requestProcessors = new Vector();
-
-
- /**
- * Vector of global request processors object names.
- */
- protected Vector globalRequestProcessors = new Vector();
-
-
- /**
- * The string manager for this package.
- */
- protected static StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- // --------------------------------------------------------- Public Methods
-
-
- /**
- * Initialize this servlet.
- */
- public void init() throws ServletException {
-
- // Retrieve the MBean server
- mBeanServer = Registry.getRegistry(null, null).getMBeanServer();
-
- // Set our properties from the initialization parameters
- String value = null;
- try {
- value = getServletConfig().getInitParameter("debug");
- debug = Integer.parseInt(value);
- } catch (Throwable t) {
- ;
- }
-
- try {
-
- // Query protocol handlers
- String onStr = "*:type=ProtocolHandler,*";
- ObjectName objectName = new ObjectName(onStr);
- Set set = mBeanServer.queryMBeans(objectName, null);
- Iterator iterator = set.iterator();
- while (iterator.hasNext()) {
- ObjectInstance oi = (ObjectInstance) iterator.next();
- protocolHandlers.addElement(oi.getObjectName());
- }
-
- // Query Thread Pools
- onStr = "*:type=ThreadPool,*";
- objectName = new ObjectName(onStr);
- set = mBeanServer.queryMBeans(objectName, null);
- iterator = set.iterator();
- while (iterator.hasNext()) {
- ObjectInstance oi = (ObjectInstance) iterator.next();
- threadPools.addElement(oi.getObjectName());
- }
-
- // Query Global Request Processors
- onStr = "*:type=GlobalRequestProcessor,*";
- objectName = new ObjectName(onStr);
- set = mBeanServer.queryMBeans(objectName, null);
- iterator = set.iterator();
- while (iterator.hasNext()) {
- ObjectInstance oi = (ObjectInstance) iterator.next();
- globalRequestProcessors.addElement(oi.getObjectName());
- }
-
- // Query Request Processors
- onStr = "*:type=RequestProcessor,*";
- objectName = new ObjectName(onStr);
- set = mBeanServer.queryMBeans(objectName, null);
- iterator = set.iterator();
- while (iterator.hasNext()) {
- ObjectInstance oi = (ObjectInstance) iterator.next();
- requestProcessors.addElement(oi.getObjectName());
- }
-
- // Register with MBean server
- onStr = "JMImplementation:type=MBeanServerDelegate";
- objectName = new ObjectName(onStr);
- mBeanServer.addNotificationListener(objectName, this, null, null);
-
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- }
-
-
- /**
- * Finalize this servlet.
- */
- public void destroy() {
-
- ; // No actions necessary
-
- }
-
-
- /**
- * Process a GET request for the specified resource.
- *
- * @param request The servlet request we are processing
- * @param response The servlet response we are creating
- *
- * @exception IOException if an input/output error occurs
- * @exception ServletException if a servlet-specified error occurs
- */
- public void doGet(HttpServletRequest request,
- HttpServletResponse response)
- throws IOException, ServletException {
-
- // mode is flag for HTML or XML output
- int mode = 0;
- // if ?XML=true, set the mode to XML
- if (request.getParameter("XML") != null
- && request.getParameter("XML").equals("true")) {
- mode = 1;
- }
- StatusTransformer.setContentType(response, mode);
-
- PrintWriter writer = response.getWriter();
-
- boolean completeStatus = false;
- if ((request.getPathInfo() != null)
- && (request.getPathInfo().equals("/all"))) {
- completeStatus = true;
- }
- // use StatusTransformer to output status
- Object[] args = new Object[1];
- args[0] = request.getContextPath();
- StatusTransformer.writeHeader(writer, args, mode);
-
- // Body Header Section
- args = new Object[2];
- args[0] = request.getContextPath();
- if (completeStatus) {
- args[1] = sm.getString("statusServlet.complete");
- } else {
- args[1] = sm.getString("statusServlet.title");
- }
- // use StatusTransformer to output status
- StatusTransformer.writeBody(writer,args,mode);
-
- // Manager Section
- args = new Object[9];
- args[0] = sm.getString("htmlManagerServlet.manager");
- args[1] = response.encodeURL(request.getContextPath() + "/html/list");
- args[2] = sm.getString("htmlManagerServlet.list");
- args[3] = response.encodeURL
- (request.getContextPath() + "/" +
- sm.getString("htmlManagerServlet.helpHtmlManagerFile"));
- args[4] = sm.getString("htmlManagerServlet.helpHtmlManager");
- args[5] = response.encodeURL
- (request.getContextPath() + "/" +
- sm.getString("htmlManagerServlet.helpManagerFile"));
- args[6] = sm.getString("htmlManagerServlet.helpManager");
- if (completeStatus) {
- args[7] = response.encodeURL
- (request.getContextPath() + "/status");
- args[8] = sm.getString("statusServlet.title");
- } else {
- args[7] = response.encodeURL
- (request.getContextPath() + "/status/all");
- args[8] = sm.getString("statusServlet.complete");
- }
- // use StatusTransformer to output status
- StatusTransformer.writeManager1(writer,args,mode);
- try {
-
- if ((request.getPathInfo() != null)
- && (request.getPathInfo().equals("/all"))) {
- // Note: Retrieving the full status is much slower
- // use StatusTransformer to output status
- StatusTransformer.writeAppList
- (writer, mBeanServer, mode);
- }
-
- } catch (Exception e) {
- throw new ServletException(e);
- }
- StatusTransformer.writeManager2(writer,args,mode);
-
- // Server Header Section
- args = new Object[7];
- args[0] = sm.getString("htmlManagerServlet.serverTitle");
- args[1] = sm.getString("htmlManagerServlet.serverVersion");
- args[2] = sm.getString("htmlManagerServlet.serverJVMVersion");
- args[3] = sm.getString("htmlManagerServlet.serverJVMVendor");
- args[4] = sm.getString("htmlManagerServlet.serverOSName");
- args[5] = sm.getString("htmlManagerServlet.serverOSVersion");
- args[6] = sm.getString("htmlManagerServlet.serverOSArch");
- // use StatusTransformer to output status
- StatusTransformer.writePageHeading(writer,args,mode);
-
- // Server Row Section
- args = new Object[6];
- args[0] = ServerInfo.getServerInfo();
- args[1] = System.getProperty("java.runtime.version");
- args[2] = System.getProperty("java.vm.vendor");
- args[3] = System.getProperty("os.name");
- args[4] = System.getProperty("os.version");
- args[5] = System.getProperty("os.arch");
- // use StatusTransformer to output status
- StatusTransformer.writeServerInfo(writer, args, mode);
-
- try {
-
- // Display operating system statistics using APR if available
- StatusTransformer.writeOSState(writer,mode);
-
- // Display virtual machine statistics
- StatusTransformer.writeVMState(writer,mode);
-
- Enumeration enumeration = threadPools.elements();
- while (enumeration.hasMoreElements()) {
- ObjectName objectName = (ObjectName) enumeration.nextElement();
- String name = objectName.getKeyProperty("name");
- // use StatusTransformer to output status
- StatusTransformer.writeConnectorState
- (writer, objectName,
- name, mBeanServer, globalRequestProcessors,
- requestProcessors, mode);
- }
-
- if ((request.getPathInfo() != null)
- && (request.getPathInfo().equals("/all"))) {
- // Note: Retrieving the full status is much slower
- // use StatusTransformer to output status
- StatusTransformer.writeDetailedState
- (writer, mBeanServer, mode);
- }
-
- } catch (Exception e) {
- throw new ServletException(e);
- }
-
- // use StatusTransformer to output status
- StatusTransformer.writeFooter(writer, mode);
-
- }
-
- // ------------------------------------------- NotificationListener Methods
-
-
- public void handleNotification(Notification notification,
- java.lang.Object handback) {
-
- if (notification instanceof MBeanServerNotification) {
- ObjectName objectName =
- ((MBeanServerNotification) notification).getMBeanName();
- if (notification.getType().equals
- (MBeanServerNotification.REGISTRATION_NOTIFICATION)) {
- String type = objectName.getKeyProperty("type");
- if (type != null) {
- if (type.equals("ProtocolHandler")) {
- protocolHandlers.addElement(objectName);
- } else if (type.equals("ThreadPool")) {
- threadPools.addElement(objectName);
- } else if (type.equals("GlobalRequestProcessor")) {
- globalRequestProcessors.addElement(objectName);
- } else if (type.equals("RequestProcessor")) {
- requestProcessors.addElement(objectName);
- }
- }
- } else if (notification.getType().equals
- (MBeanServerNotification.UNREGISTRATION_NOTIFICATION)) {
- String type = objectName.getKeyProperty("type");
- if (type != null) {
- if (type.equals("ProtocolHandler")) {
- protocolHandlers.removeElement(objectName);
- } else if (type.equals("ThreadPool")) {
- threadPools.removeElement(objectName);
- } else if (type.equals("GlobalRequestProcessor")) {
- globalRequestProcessors.removeElement(objectName);
- } else if (type.equals("RequestProcessor")) {
- requestProcessors.removeElement(objectName);
- }
- }
- String j2eeType = objectName.getKeyProperty("j2eeType");
- if (j2eeType != null) {
-
- }
- }
- }
-
- }
-
-
-}
Deleted: trunk/src/main/java/org/apache/catalina/manager/StatusTransformer.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/manager/StatusTransformer.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/manager/StatusTransformer.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,960 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.apache.catalina.manager;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.lang.reflect.Method;
-import java.text.MessageFormat;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.Vector;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectInstance;
-import javax.management.ObjectName;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.catalina.util.RequestUtil;
-
-/**
- * This is a refactoring of the servlet to externalize
- * the output into a simple class. Although we could
- * use XSLT, that is unnecessarily complex.
- *
- * @author Peter Lin
- * @version $Revision: 1237 $ $Date: 2009-11-03 02:55:48 +0100 (Tue, 03 Nov 2009) $
- */
-
-public class StatusTransformer {
-
-
- // --------------------------------------------------------- Public Methods
-
-
- public static void setContentType(HttpServletResponse response,
- int mode) {
- if (mode == 0){
- response.setContentType("text/html;charset="+Constants.CHARSET);
- } else if (mode == 1){
- response.setContentType("text/xml;charset="+Constants.CHARSET);
- }
- }
-
-
- /**
- * Process a GET request for the specified resource.
- *
- * @param request The servlet request we are processing
- * @param response The servlet response we are creating
- *
- * @exception IOException if an input/output error occurs
- * @exception ServletException if a servlet-specified error occurs
- */
- public static void writeHeader(PrintWriter writer, Object[] args, int mode) {
- if (mode == 0){
- // HTML Header Section
- writer.print(MessageFormat.format
- (Constants.HTML_HEADER_SECTION, args));
- } else if (mode == 1){
- writer.write(Constants.XML_DECLARATION);
- writer.write
- (Constants.XML_STYLE);
- writer.write("<status>");
- }
- }
-
-
- /**
- * Write the header body. XML output doesn't bother
- * to output this stuff, since it's just title.
- *
- * @param writer The output writer
- * @param args What to write
- * @param mode 0 means write
- */
- public static void writeBody(PrintWriter writer, Object[] args, int mode) {
- if (mode == 0){
- writer.print(MessageFormat.format
- (Constants.BODY_HEADER_SECTION, args));
- }
- }
-
-
- /**
- * Write the manager webapp information.
- *
- * @param writer The output writer
- * @param args What to write
- * @param mode 0 means write
- */
- public static void writeManager1(PrintWriter writer, Object[] args,
- int mode) {
- if (mode == 0){
- writer.print(MessageFormat.format(Constants.MANAGER_STATUS_SECTION1, args));
- }
- }
-
-
- /**
- * Write the manager webapp information.
- *
- * @param writer The output writer
- * @param args What to write
- * @param mode 0 means write
- */
- public static void writeManager2(PrintWriter writer, Object[] args,
- int mode) {
- if (mode == 0){
- writer.print(MessageFormat.format(Constants.MANAGER_STATUS_SECTION2, args));
- }
- }
-
-
- public static void writePageHeading(PrintWriter writer, Object[] args,
- int mode) {
- if (mode == 0){
- writer.print(MessageFormat.format
- (Constants.SERVER_HEADER_SECTION, args));
- }
- }
-
-
- public static void writeServerInfo(PrintWriter writer, Object[] args,
- int mode){
- if (mode == 0){
- writer.print(MessageFormat.format(Constants.SERVER_ROW_SECTION, args));
- }
- }
-
-
- /**
- *
- */
- public static void writeFooter(PrintWriter writer, int mode) {
- if (mode == 0){
- // HTML Tail Section
- writer.print(Constants.HTML_TAIL_SECTION);
- } else if (mode == 1){
- writer.write("</status>");
- }
- }
-
-
- /**
- * Write the OS state. Mode 0 will generate HTML.
- * Mode 1 will generate XML.
- */
- public static void writeOSState(PrintWriter writer, int mode) {
- long[] result = new long[16];
- boolean ok = false;
- try {
- String methodName = "info";
- Class paramTypes[] = new Class[1];
- paramTypes[0] = result.getClass();
- Object paramValues[] = new Object[1];
- paramValues[0] = result;
- Method method = Class.forName("org.apache.tomcat.jni.OS")
- .getMethod(methodName, paramTypes);
- method.invoke(null, paramValues);
- ok = true;
- } catch (Throwable t) {
- // Ignore
- }
-
- if (ok) {
- if (mode == 0){
- writer.print("<h3>OS</h3>");
-
- writer.print("<p>");
- writer.print(" <strong>Physical memory:</strong> ");
- writer.print(formatSize(new Long(result[0]), true));
- writer.print("<br><strong>Available memory:</strong> ");
- writer.print(formatSize(new Long(result[1]), true));
- writer.print("<br><strong>Total page file:</strong> ");
- writer.print(formatSize(new Long(result[2]), true));
- writer.print("<br><strong>Free page file:</strong> ");
- writer.print(formatSize(new Long(result[3]), true));
- writer.print("<br><strong>Memory load:</strong> ");
- writer.print(new Long(result[6]));
- writer.print("<br><strong>Process kernel time:</strong> ");
- writer.print(formatTime(new Long(result[11] / 1000), true));
- writer.print("<br><strong>Process user time:</strong> ");
- writer.print(formatTime(new Long(result[12] / 1000), true));
- writer.print("</p>");
- } else if (mode == 1){
- }
- }
-
- }
-
-
- /**
- * Write the VM state. Mode 0 will generate HTML.
- * Mode 1 will generate XML.
- */
- public static void writeVMState(PrintWriter writer, int mode)
- throws Exception {
-
- if (mode == 0){
- writer.print("<h3>JVM</h3>");
-
- writer.print("<p>");
- writer.print(" <strong>Free memory:</strong> ");
- writer.print(formatSize
- (new Long(Runtime.getRuntime().freeMemory()), true));
- writer.print(" <br><strong>Total memory:</strong> ");
- writer.print(formatSize
- (new Long(Runtime.getRuntime().totalMemory()), true));
- writer.print(" <br><strong>Max memory:</strong> ");
- writer.print(formatSize
- (new Long(Runtime.getRuntime().maxMemory()), true));
- writer.print("</p>");
- } else if (mode == 1){
- writer.write("<jvm>");
-
- writer.write("<memory");
- writer.write(" free='" + Runtime.getRuntime().freeMemory() + "'");
- writer.write(" total='" + Runtime.getRuntime().totalMemory() + "'");
- writer.write(" max='" + Runtime.getRuntime().maxMemory() + "'/>");
-
- writer.write("</jvm>");
- }
-
- }
-
-
- /**
- * Write connector state.
- */
- public static void writeConnectorState(PrintWriter writer,
- ObjectName tpName, String name,
- MBeanServer mBeanServer,
- Vector globalRequestProcessors,
- Vector requestProcessors, int mode)
- throws Exception {
-
- if (mode == 0) {
- writer.print("<h3>");
- writer.print(name);
- writer.print("</h3>");
-
- writer.print("<p>");
- writer.print(" <strong>Max threads:</strong> ");
- writer.print(mBeanServer.getAttribute(tpName, "maxThreads"));
- writer.print(" <br><strong>Current thread count:</strong> ");
- writer.print(mBeanServer.getAttribute(tpName, "currentThreadCount"));
- writer.print(" <br><strong>Current thread busy:</strong> ");
- writer.print(mBeanServer.getAttribute(tpName, "currentThreadsBusy"));
- try {
- Object value = mBeanServer.getAttribute(tpName, "keepAliveCount");
- writer.print(" <br><strong>Keeped alive sockets count:</strong> ");
- writer.print(value);
- } catch (Exception e) {
- // Ignore
- }
-
- ObjectName grpName = null;
-
- Enumeration enumeration = globalRequestProcessors.elements();
- while (enumeration.hasMoreElements()) {
- ObjectName objectName = (ObjectName) enumeration.nextElement();
- if (name.equals(objectName.getKeyProperty("name"))) {
- grpName = objectName;
- }
- }
-
- if (grpName == null) {
- return;
- }
-
- writer.print(" <br><strong>Max processing time:</strong> ");
- writer.print(formatTime(mBeanServer.getAttribute
- (grpName, "maxTime"), false));
- writer.print(" <br><strong>Processing time:</strong> ");
- writer.print(formatTime(mBeanServer.getAttribute
- (grpName, "processingTime"), true));
- writer.print(" <br><strong>Request count:</strong> ");
- writer.print(mBeanServer.getAttribute(grpName, "requestCount"));
- writer.print(" <br><strong>Error count:</strong> ");
- writer.print(mBeanServer.getAttribute(grpName, "errorCount"));
- writer.print(" <br><strong>Bytes received:</strong> ");
- writer.print(formatSize(mBeanServer.getAttribute
- (grpName, "bytesReceived"), true));
- writer.print(" <br><strong>Bytes sent:</strong> ");
- writer.print(formatSize(mBeanServer.getAttribute
- (grpName, "bytesSent"), true));
- writer.print("</p>");
-
- writer.print("<table width=\"100%\" cellspacing=\"0\" class=\"tableStyle\">");
- writer.print("<thead><th colspan=\"7\">");
- writer.print(name);
- writer.print("</th></thead>");
- writer.print("<tr class=\"UnsortableTableHeader\"><td>Stage</td><td>Time</td><td>B Sent</td><td>B Received</td><td>Client</td><td>V. Host</td><td>Request</td></tr><tbody>");
-
- enumeration = requestProcessors.elements();
- boolean isHighlighted = false;
- String highlightStyle = null;
- while (enumeration.hasMoreElements()) {
- isHighlighted = !isHighlighted;
- if(isHighlighted) {
- highlightStyle = "oddRow";
- } else {
- highlightStyle = "evenRow";
- }
- ObjectName objectName = (ObjectName) enumeration.nextElement();
- if (name.equals(objectName.getKeyProperty("worker"))) {
- writer.print("<tr class=\"");
- writer.print(highlightStyle);
- writer.print("\">");
- writeProcessorState(writer, objectName, mBeanServer, mode);
- writer.print("</tr>");
- }
- }
-
- writer.print("<caption align=\"bottom\">P: Parse and prepare request S: Service F: Finishing R: Ready K: Keepalive</caption></tbody></table>");
-
- } else if (mode == 1){
- writer.write("<connector name='" + name + "'>");
-
- writer.write("<threadInfo ");
- writer.write(" maxThreads=\"" + mBeanServer.getAttribute(tpName, "maxThreads") + "\"");
- writer.write(" currentThreadCount=\"" + mBeanServer.getAttribute(tpName, "currentThreadCount") + "\"");
- writer.write(" currentThreadsBusy=\"" + mBeanServer.getAttribute(tpName, "currentThreadsBusy") + "\"");
- writer.write(" />");
-
- ObjectName grpName = null;
-
- Enumeration enumeration = globalRequestProcessors.elements();
- while (enumeration.hasMoreElements()) {
- ObjectName objectName = (ObjectName) enumeration.nextElement();
- if (name.equals(objectName.getKeyProperty("name"))) {
- grpName = objectName;
- }
- }
-
- if (grpName != null) {
-
- writer.write("<requestInfo ");
- writer.write(" maxTime=\"" + mBeanServer.getAttribute(grpName, "maxTime") + "\"");
- writer.write(" processingTime=\"" + mBeanServer.getAttribute(grpName, "processingTime") + "\"");
- writer.write(" requestCount=\"" + mBeanServer.getAttribute(grpName, "requestCount") + "\"");
- writer.write(" errorCount=\"" + mBeanServer.getAttribute(grpName, "errorCount") + "\"");
- writer.write(" bytesReceived=\"" + mBeanServer.getAttribute(grpName, "bytesReceived") + "\"");
- writer.write(" bytesSent=\"" + mBeanServer.getAttribute(grpName, "bytesSent") + "\"");
- writer.write(" />");
-
- writer.write("<workers>");
- enumeration = requestProcessors.elements();
- while (enumeration.hasMoreElements()) {
- ObjectName objectName = (ObjectName) enumeration.nextElement();
- if (name.equals(objectName.getKeyProperty("worker"))) {
- writeProcessorState(writer, objectName, mBeanServer, mode);
- }
- }
- writer.write("</workers>");
- }
-
- writer.write("</connector>");
- }
-
- }
-
-
- /**
- * Write processor state.
- */
- protected static void writeProcessorState(PrintWriter writer,
- ObjectName pName,
- MBeanServer mBeanServer,
- int mode)
- throws Exception {
-
- Integer stageValue =
- (Integer) mBeanServer.getAttribute(pName, "stage");
- int stage = stageValue.intValue();
- boolean fullStatus = true;
- boolean showRequest = true;
- String stageStr = null;
-
- switch (stage) {
-
- case (1/*org.apache.coyote.Constants.STAGE_PARSE*/):
- stageStr = "P";
- fullStatus = false;
- break;
- case (2/*org.apache.coyote.Constants.STAGE_PREPARE*/):
- stageStr = "P";
- fullStatus = false;
- break;
- case (3/*org.apache.coyote.Constants.STAGE_SERVICE*/):
- stageStr = "S";
- break;
- case (4/*org.apache.coyote.Constants.STAGE_ENDINPUT*/):
- stageStr = "F";
- break;
- case (5/*org.apache.coyote.Constants.STAGE_ENDOUTPUT*/):
- stageStr = "F";
- break;
- case (7/*org.apache.coyote.Constants.STAGE_ENDED*/):
- stageStr = "R";
- fullStatus = false;
- break;
- case (6/*org.apache.coyote.Constants.STAGE_KEEPALIVE*/):
- stageStr = "K";
- fullStatus = true;
- showRequest = false;
- break;
- case (0/*org.apache.coyote.Constants.STAGE_NEW*/):
- stageStr = "R";
- fullStatus = false;
- break;
- default:
- // Unknown stage
- stageStr = "?";
- fullStatus = false;
-
- }
-
- if (mode == 0) {
- writer.write("<td class=\"first\"><strong>");
- writer.write(stageStr);
- writer.write("</strong></td>");
-
- if (fullStatus) {
- writer.write("<td>");
- writer.print(formatTime(mBeanServer.getAttribute
- (pName, "requestProcessingTime"), false));
- writer.write("</td>");
- writer.write("<td>");
- if (showRequest) {
- writer.print(formatSize(mBeanServer.getAttribute
- (pName, "requestBytesSent"), false));
- } else {
- writer.write("?");
- }
- writer.write("</td>");
- writer.write("<td>");
- if (showRequest) {
- writer.print(formatSize(mBeanServer.getAttribute
- (pName, "requestBytesReceived"),
- false));
- } else {
- writer.write("?");
- }
- writer.write("</td>");
- writer.write("<td>");
- writer.print(filter(mBeanServer.getAttribute
- (pName, "remoteAddr")));
- writer.write("</td>");
- writer.write("<td nowrap>");
- writer.write(filter(mBeanServer.getAttribute
- (pName, "virtualHost")));
- writer.write("</td>");
- writer.write("<td nowrap>");
- if (showRequest) {
- writer.write(filter(mBeanServer.getAttribute
- (pName, "method")));
- writer.write(" ");
- writer.write(filter(mBeanServer.getAttribute
- (pName, "currentUri")));
- String queryString = (String) mBeanServer.getAttribute
- (pName, "currentQueryString");
- if ((queryString != null) && (!queryString.equals(""))) {
- writer.write("?");
- writer.print(RequestUtil.filter(queryString));
- }
- writer.write(" ");
- writer.write(filter(mBeanServer.getAttribute
- (pName, "protocol")));
- } else {
- writer.write("?");
- }
- writer.write("</td>");
- } else {
- writer.write("<td>?</td><td>?</td><td>?</td><td>?</td><td>?</td><td>?</td>");
- }
- } else if (mode == 1){
- writer.write("<worker ");
- writer.write(" stage=\"" + stageStr + "\"");
-
- if (fullStatus) {
- writer.write(" requestProcessingTime=\""
- + mBeanServer.getAttribute
- (pName, "requestProcessingTime") + "\"");
- writer.write(" requestBytesSent=\"");
- if (showRequest) {
- writer.write("" + mBeanServer.getAttribute
- (pName, "requestBytesSent"));
- } else {
- writer.write("0");
- }
- writer.write("\"");
- writer.write(" requestBytesReceived=\"");
- if (showRequest) {
- writer.write("" + mBeanServer.getAttribute
- (pName, "requestBytesReceived"));
- } else {
- writer.write("0");
- }
- writer.write("\"");
- writer.write(" remoteAddr=\""
- + filter(mBeanServer.getAttribute
- (pName, "remoteAddr")) + "\"");
- writer.write(" virtualHost=\""
- + filter(mBeanServer.getAttribute
- (pName, "virtualHost")) + "\"");
-
- if (showRequest) {
- writer.write(" method=\""
- + filter(mBeanServer.getAttribute
- (pName, "method")) + "\"");
- writer.write(" currentUri=\""
- + filter(mBeanServer.getAttribute
- (pName, "currentUri")) + "\"");
-
- String queryString = (String) mBeanServer.getAttribute
- (pName, "currentQueryString");
- if ((queryString != null) && (!queryString.equals(""))) {
- writer.write(" currentQueryString=\""
- + RequestUtil.filter(queryString) + "\"");
- } else {
- writer.write(" currentQueryString=\"?\"");
- }
- writer.write(" protocol=\""
- + filter(mBeanServer.getAttribute
- (pName, "protocol")) + "\"");
- } else {
- writer.write(" method=\"?\"");
- writer.write(" currentUri=\"?\"");
- writer.write(" currentQueryString=\"?\"");
- writer.write(" protocol=\"?\"");
- }
- } else {
- writer.write(" requestProcessingTime=\"0\"");
- writer.write(" requestBytesSent=\"0\"");
- writer.write(" requestBytesRecieved=\"0\"");
- writer.write(" remoteAddr=\"?\"");
- writer.write(" virtualHost=\"?\"");
- writer.write(" method=\"?\"");
- writer.write(" currentUri=\"?\"");
- writer.write(" currentQueryString=\"?\"");
- writer.write(" protocol=\"?\"");
- }
- writer.write(" />");
- }
-
- }
-
-
- /**
- * Write applications state.
- */
- public static void writeDetailedState(PrintWriter writer,
- MBeanServer mBeanServer, int mode)
- throws Exception {
-
- if (mode == 0){
- ObjectName queryHosts = new ObjectName("*:j2eeType=WebModule,*");
- Set hostsON = mBeanServer.queryNames(queryHosts, null);
-
- // Webapp list
- int count = 0;
- Iterator iterator = hostsON.iterator();
- while (iterator.hasNext()) {
- ObjectName contextON = (ObjectName) iterator.next();
- writer.print("<a name=\"" + (count++) + ".0\">");
- writeContext(writer, contextON, mBeanServer, mode);
- }
-
- } else if (mode == 1){
- // for now we don't write out the Detailed state in XML
- }
-
- }
-
-
- /**
- * Write applications state.
- */
- public static void writeAppList(PrintWriter writer,
- MBeanServer mBeanServer, int mode)
- throws Exception {
-
- if (mode == 0){
- ObjectName queryHosts = new ObjectName("*:j2eeType=WebModule,*");
- Set hostsON = mBeanServer.queryNames(queryHosts, null);
-
- // Navigation menu
- writer.print("<dt>Application list</dt>");
-
- int count = 0;
- Iterator iterator = hostsON.iterator();
- while (iterator.hasNext()) {
- writer.print("<dd>");
- ObjectName contextON = (ObjectName) iterator.next();
- String webModuleName = contextON.getKeyProperty("name");
- if (webModuleName.startsWith("//")) {
- webModuleName = webModuleName.substring(2);
- }
- int slash = webModuleName.indexOf("/");
- if (slash == -1) {
- count++;
- continue;
- }
-
- writer.print("<a href=\"#" + (count++) + ".0\">");
- writer.print(webModuleName);
- writer.print("</a>");
- writer.print("</dd>");
- }
-
- } else if (mode == 1){
- // for now we don't write out the Detailed state in XML
- }
-
- }
-
-
- /**
- * Write context state.
- */
- protected static void writeContext(PrintWriter writer,
- ObjectName objectName,
- MBeanServer mBeanServer, int mode)
- throws Exception {
-
- if (mode == 0){
- String webModuleName = objectName.getKeyProperty("name");
- String name = webModuleName;
- if (name == null) {
- return;
- }
-
- String hostName = null;
- String contextName = null;
- if (name.startsWith("//")) {
- name = name.substring(2);
- }
- int slash = name.indexOf("/");
- if (slash != -1) {
- hostName = name.substring(0, slash);
- contextName = name.substring(slash);
- } else {
- return;
- }
-
- ObjectName queryManager = new ObjectName
- (objectName.getDomain() + ":type=Manager,path=" + contextName
- + ",host=" + hostName + ",*");
- Set managersON = mBeanServer.queryNames(queryManager, null);
- ObjectName managerON = null;
- Iterator iterator2 = managersON.iterator();
- while (iterator2.hasNext()) {
- managerON = (ObjectName) iterator2.next();
- }
-
- ObjectName queryJspMonitor = new ObjectName
- (objectName.getDomain() + ":type=JspMonitor,WebModule=" +
- webModuleName + ",*");
- Set jspMonitorONs = mBeanServer.queryNames(queryJspMonitor, null);
-
- // Special case for the root context
- if (contextName.equals("/")) {
- contextName = "";
- }
-
- writer.print("<h3>");
- writer.print(name);
- writer.print("</h3>");
- writer.print("</a>");
-
- writer.print("<p>");
- Object startTime = mBeanServer.getAttribute(objectName,
- "startTime");
- writer.print(" <strong>Start time:</strong> " +
- new Date(((Long) startTime).longValue()));
- writer.print(" <br><strong>Startup time:</strong> ");
- writer.print(formatTime(mBeanServer.getAttribute
- (objectName, "startupTime"), false));
- writer.print(" <br><strong>TLD scan time:</strong> ");
- writer.print(formatTime(mBeanServer.getAttribute
- (objectName, "tldScanTime"), false));
- if (managerON != null) {
- writeManager(writer, managerON, mBeanServer, mode);
- }
- if (jspMonitorONs != null) {
- writeJspMonitor(writer, jspMonitorONs, mBeanServer, mode);
- }
- writer.print("</p>");
-
- String onStr = objectName.getDomain()
- + ":j2eeType=Servlet,WebModule=" + webModuleName + ",*";
- ObjectName servletObjectName = new ObjectName(onStr);
- Set set = mBeanServer.queryMBeans(servletObjectName, null);
- Iterator iterator = set.iterator();
- while (iterator.hasNext()) {
- ObjectInstance oi = (ObjectInstance) iterator.next();
- writeWrapper(writer, oi.getObjectName(), mBeanServer, mode);
- }
-
- } else if (mode == 1){
- // for now we don't write out the context in XML
- }
-
- }
-
-
- /**
- * Write detailed information about a manager.
- */
- public static void writeManager(PrintWriter writer, ObjectName objectName,
- MBeanServer mBeanServer, int mode)
- throws Exception {
-
- if (mode == 0) {
- writer.print(" <br><strong>Active sessions:</strong> ");
- writer.print(mBeanServer.getAttribute
- (objectName, "activeSessions"));
- writer.print(" <br><strong>Session count:</strong> ");
- writer.print(mBeanServer.getAttribute
- (objectName, "sessionCounter"));
- writer.print(" <br><strong>Max active sessions:</strong> ");
- writer.print(mBeanServer.getAttribute(objectName, "maxActive"));
- writer.print(" <br><strong>Rejected session creations:</strong> ");
- writer.print(mBeanServer.getAttribute
- (objectName, "rejectedSessions"));
- writer.print(" <br><strong>Expired sessions:</strong> ");
- writer.print(mBeanServer.getAttribute
- (objectName, "expiredSessions"));
- writer.print(" <br><strong>Longest session alive time:</strong> ");
- writer.print(formatSeconds(mBeanServer.getAttribute(
- objectName,
- "sessionMaxAliveTime")));
- writer.print(" <br><strong>Average session alive time:</strong> ");
- writer.print(formatSeconds(mBeanServer.getAttribute(
- objectName,
- "sessionAverageAliveTime")));
- writer.print(" <br><strong>Processing time:</strong> ");
- writer.print(formatTime(mBeanServer.getAttribute
- (objectName, "processingTime"), false));
- } else if (mode == 1) {
- // for now we don't write out the wrapper details
- }
-
- }
-
-
- /**
- * Write JSP monitoring information.
- */
- public static void writeJspMonitor(PrintWriter writer,
- Set jspMonitorONs,
- MBeanServer mBeanServer,
- int mode)
- throws Exception {
-
- int jspCount = 0;
- int jspReloadCount = 0;
-
- Iterator iter = jspMonitorONs.iterator();
- while (iter.hasNext()) {
- ObjectName jspMonitorON = (ObjectName) iter.next();
- Object obj = mBeanServer.getAttribute(jspMonitorON, "jspCount");
- jspCount += ((Integer) obj).intValue();
- obj = mBeanServer.getAttribute(jspMonitorON, "jspReloadCount");
- jspReloadCount += ((Integer) obj).intValue();
- }
-
- if (mode == 0) {
- writer.print(" <br><strong>JSPs loaded:</strong> ");
- writer.print(jspCount);
- writer.print(" <br><strong>JSPs reloaded:</strong> ");
- writer.print(jspReloadCount);
- } else if (mode == 1) {
- // for now we don't write out anything
- }
- }
-
-
- /**
- * Write detailed information about a wrapper.
- */
- public static void writeWrapper(PrintWriter writer, ObjectName objectName,
- MBeanServer mBeanServer, int mode)
- throws Exception {
-
- if (mode == 0) {
- String servletName = objectName.getKeyProperty("name");
-
- String[] mappings = (String[])
- mBeanServer.invoke(objectName, "findMappings", null, null);
-
- writer.print("<h2>");
- writer.print(servletName);
- if ((mappings != null) && (mappings.length > 0)) {
- writer.print(" [ ");
- for (int i = 0; i < mappings.length; i++) {
- writer.print(mappings[i]);
- if (i < mappings.length - 1) {
- writer.print(" , ");
- }
- }
- writer.print(" ] ");
- }
- writer.print("</h2>");
-
- writer.print("<p>");
- writer.print(" <strong>Processing time:</strong> ");
- writer.print(formatTime(mBeanServer.getAttribute
- (objectName, "processingTime"), true));
- writer.print(" <br><strong>Max time:</strong> ");
- writer.print(formatTime(mBeanServer.getAttribute
- (objectName, "maxTime"), false));
- writer.print(" <br><strong>Request count:</strong> ");
- writer.print(mBeanServer.getAttribute(objectName, "requestCount"));
- writer.print(" <br><strong>Error count:</strong> ");
- writer.print(mBeanServer.getAttribute(objectName, "errorCount"));
- writer.print(" <br><strong>Load time:</strong> ");
- writer.print(formatTime(mBeanServer.getAttribute
- (objectName, "loadTime"), false));
- writer.print(" <br><strong>Classloading time:</strong> ");
- writer.print(formatTime(mBeanServer.getAttribute
- (objectName, "classLoadTime"), false));
- writer.print("</p>");
- } else if (mode == 1){
- // for now we don't write out the wrapper details
- }
-
- }
-
-
- /**
- * Filter the specified message string for characters that are sensitive
- * in HTML. This avoids potential attacks caused by including JavaScript
- * codes in the request URL that is often reported in error messages.
- *
- * @param obj The message string to be filtered
- */
- public static String filter(Object obj) {
-
- if (obj == null)
- return ("?");
- String message = obj.toString();
-
- char content[] = new char[message.length()];
- message.getChars(0, message.length(), content, 0);
- StringBuilder result = new StringBuilder(content.length + 50);
- for (int i = 0; i < content.length; i++) {
- switch (content[i]) {
- case '<':
- result.append("<");
- break;
- case '>':
- result.append(">");
- break;
- case '&':
- result.append("&");
- break;
- case '"':
- result.append(""");
- break;
- default:
- result.append(content[i]);
- }
- }
- return (result.toString());
-
- }
-
-
- /**
- * Display the given size in bytes, either as KB or MB.
- *
- * @param mb true to display megabytes, false for kilobytes
- */
- public static String formatSize(Object obj, boolean mb) {
-
- long bytes = -1L;
-
- if (obj instanceof Long) {
- bytes = ((Long) obj).longValue();
- } else if (obj instanceof Integer) {
- bytes = ((Integer) obj).intValue();
- }
-
- if (mb) {
- long mbytes = bytes / (1024 * 1024);
- long rest =
- ((bytes - (mbytes * (1024 * 1024))) * 100) / (1024 * 1024);
- return (mbytes + "." + ((rest < 10) ? "0" : "") + rest + " MB");
- } else {
- return ((bytes / 1024) + " KB");
- }
-
- }
-
-
- /**
- * Display the given time in ms, either as ms or s.
- *
- * @param seconds true to display seconds, false for milliseconds
- */
- public static String formatTime(Object obj, boolean seconds) {
-
- long time = -1L;
-
- if (obj instanceof Long) {
- time = ((Long) obj).longValue();
- } else if (obj instanceof Integer) {
- time = ((Integer) obj).intValue();
- }
-
- if (seconds) {
- return ((((float) time ) / 1000) + " s");
- } else {
- return (time + " ms");
- }
- }
-
-
- /**
- * Formats the given time (given in seconds) as a string.
- *
- * @param obj Time object to be formatted as string
- *
- * @return String formatted time
- */
- public static String formatSeconds(Object obj) {
-
- long time = -1L;
-
- if (obj instanceof Long) {
- time = ((Long) obj).longValue();
- } else if (obj instanceof Integer) {
- time = ((Integer) obj).intValue();
- }
-
- return (time + " s");
- }
-
-}
Deleted: trunk/src/main/java/org/apache/catalina/security/LocalStrings.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/security/LocalStrings.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/security/LocalStrings.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,2 +0,0 @@
-SecurityUtil.doAsPrivilege=An exception occurs when running the PrivilegedExceptionAction block.
-
Deleted: trunk/src/main/java/org/apache/catalina/security/LocalStrings_es.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/security/LocalStrings_es.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/security/LocalStrings_es.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-
-SecurityUtil.doAsPrivilege=Ha tenido lugar una excepci�n al ejecutar el bloque PrivilegedExceptionAction.
-
Deleted: trunk/src/main/java/org/apache/catalina/security/LocalStrings_fr.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/security/LocalStrings_fr.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/security/LocalStrings_fr.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,2 +0,0 @@
-SecurityUtil.doAsPrivilege=Une exception s''est produite lors de l''ex�cution du bloc "PrivilegedExceptionAction".
-
Deleted: trunk/src/main/java/org/apache/catalina/security/LocalStrings_ja.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/security/LocalStrings_ja.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/security/LocalStrings_ja.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,2 +0,0 @@
-SecurityUtil.doAsPrivilege=PrivilegedExceptionAction\u30d6\u30ed\u30c3\u30af\u3092\u5b9f\u884c\u4e2d\u306b\u4f8b\u5916\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
-
Modified: trunk/src/main/java/org/apache/catalina/security/SecurityUtil.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/security/SecurityUtil.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/security/SecurityUtil.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -69,23 +69,11 @@
private static HashMap<Object,Method[]> objectCache =
new HashMap<Object,Method[]>();
- private static org.jboss.logging.Logger log=
- org.jboss.logging.Logger.getLogger( SecurityUtil.class );
-
- private static String PACKAGE = "org.apache.catalina.security";
-
private static boolean packageDefinitionEnabled =
(System.getProperty("package.definition") == null &&
System.getProperty("package.access") == null) ? false : true;
/**
- * The string resources for this package.
- */
- private static final StringManager sm =
- StringManager.getManager(PACKAGE);
-
-
- /**
* Perform work as a particular </code>Subject</code>. Here the work
* will be granted to a <code>null</code> subject.
*
@@ -314,10 +302,6 @@
e = pe;
}
- if (log.isDebugEnabled()){
- log.debug(sm.getString("SecurityUtil.doAsPrivilege"), e);
- }
-
if (e instanceof UnavailableException)
throw (UnavailableException) e;
else if (e instanceof ServletException)
Modified: trunk/src/main/java/org/apache/catalina/servlets/DefaultServlet.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/servlets/DefaultServlet.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/servlets/DefaultServlet.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -19,6 +19,8 @@
package org.apache.catalina.servlets;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -63,7 +65,6 @@
import org.apache.catalina.connector.ResponseFacade;
import org.apache.catalina.util.RequestUtil;
import org.apache.catalina.util.ServerInfo;
-import org.apache.catalina.util.StringManager;
import org.apache.catalina.util.URLEncoder;
import org.apache.naming.resources.CacheEntry;
import org.apache.naming.resources.ProxyDirContext;
@@ -205,13 +206,6 @@
/**
- * The string manager for this package.
- */
- protected static StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- /**
* Size of file transfer buffer in bytes.
*/
protected static final int BUFFER_SIZE = 4096;
@@ -654,8 +648,7 @@
// We're included, and the response.sendError() below is going
// to be ignored by the resource that is including us.
// Therefore, throw an exception to notify the error.
- throw new FileNotFoundException(sm.getString("defaultServlet.missingResource",
- RequestUtil.filter(requestUri)));
+ throw new FileNotFoundException(MESSAGES.resourceNotAvailable(RequestUtil.filter(requestUri)));
}
response.sendError(HttpServletResponse.SC_NOT_FOUND,
@@ -1254,7 +1247,7 @@
sb.append("<html>\r\n");
sb.append("<head>\r\n");
sb.append("<title>");
- sb.append(sm.getString("directory.title", name));
+ sb.append(MESSAGES.listingDirectoryTitle(name));
sb.append("</title>\r\n");
sb.append("<STYLE><!--");
sb.append(org.apache.catalina.util.TomcatCSS.TOMCAT_CSS);
@@ -1262,7 +1255,7 @@
sb.append("</head>\r\n");
sb.append("<body>");
sb.append("<h1>");
- sb.append(sm.getString("directory.title", name));
+ sb.append(MESSAGES.listingDirectoryTitle(name));
// Render the link to our parent (if required)
String parentDirectory = name;
@@ -1282,7 +1275,7 @@
sb.append("/");
sb.append("\">");
sb.append("<b>");
- sb.append(sm.getString("directory.parent", parent));
+ sb.append(MESSAGES.listingDirectoryParent(parent));
sb.append("</b>");
sb.append("</a>");
}
@@ -1296,13 +1289,13 @@
// Render the column headings
sb.append("<tr>\r\n");
sb.append("<td align=\"left\"><font size=\"+1\"><strong>");
- sb.append(sm.getString("directory.filename"));
+ sb.append(MESSAGES.listingFilename());
sb.append("</strong></font></td>\r\n");
sb.append("<td align=\"center\"><font size=\"+1\"><strong>");
- sb.append(sm.getString("directory.size"));
+ sb.append(MESSAGES.listingSize());
sb.append("</strong></font></td>\r\n");
sb.append("<td align=\"right\"><font size=\"+1\"><strong>");
- sb.append(sm.getString("directory.lastModified"));
+ sb.append(MESSAGES.listingLastModified());
sb.append("</strong></font></td>\r\n");
sb.append("</tr>");
Deleted: trunk/src/main/java/org/apache/catalina/servlets/LocalStrings.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/servlets/LocalStrings.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/servlets/LocalStrings.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,13 +0,0 @@
-defaultServlet.missingResource=The requested resource ({0}) is not available
-defaultservlet.directorylistingfor=Directory Listing for:
-defaultservlet.upto=Up to:
-defaultservlet.subdirectories=Subdirectories:
-defaultservlet.files=Files:
-webdavservlet.jaxpfailed=JAXP initialization failed
-directory.filename=Filename
-directory.lastModified=Last Modified
-directory.parent=Up To {0}
-directory.size=Size
-directory.title=Directory Listing For {0}
-directory.version=Tomcat Catalina version 4.0
-
Deleted: trunk/src/main/java/org/apache/catalina/servlets/LocalStrings_es.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/servlets/LocalStrings_es.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/servlets/LocalStrings_es.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,33 +0,0 @@
-defaultServlet.missingResource = El recurso requerido {0} no se encuentra disponible
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-defaultservlet.directorylistingfor = Listado de Directorio para\:
-defaultservlet.upto = Atr\u00E1s a\:
-defaultservlet.subdirectories = Subdirectorios\:
-defaultservlet.files = Archivos\:
-invokerServlet.allocate = No puedo reservar espacio para instancia de servlet para trayectoria {0}
-invokerServlet.cannotCreate = No puedo crear arropador (wrapper) de servlet para trayectoria {0}
-invokerServlet.deallocate = No puedo recuperar instancia de servlet para trayectoria {0}
-invokerServlet.invalidPath = No se ha especificado nombre de servlet o clase en trayectoria {0}
-invokerServlet.notNamed = No puedo llamar a servlet invocador mediante un despachador nombrado (named)
-invokerServlet.noWrapper = El Contenedor no ha llamado a setWrapper() para este servlet
-webdavservlet.jaxpfailed = Fall\u00F3 la inicializaci\u00F3n de JAXP
-webdavservlet.enternalEntityIgnored = El requerimiento inclu\u00EDa una referencia a una entidad externa con PublicID {0} y SystemID {1} que fue ignorada
-directory.filename = Nombre de Archivo
-directory.lastModified = \u00DAltima Modificaci\u00F3n
-directory.parent = Atr\u00E1s A {0}
-directory.size = Medida
-directory.title = Listado de Directorio Para {0}
-directory.version = Tomcat Catalina versi\u00F3n 4.0
Deleted: trunk/src/main/java/org/apache/catalina/servlets/LocalStrings_fr.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/servlets/LocalStrings_fr.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/servlets/LocalStrings_fr.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,18 +0,0 @@
-defaultservlet.directorylistingfor=Liste du r�pertoire pour :
-defaultservlet.upto=Jusqu''�:
-defaultservlet.subdirectories=Sous-r�pertoires:
-defaultservlet.files=Fichiers:
-invokerServlet.allocate=Impossible d''allouer une instance de servlet pour le chemin {0}
-invokerServlet.cannotCreate=Impossible de cr�er un enrobeur (wrapper) de servlet pour le chemin {0}
-invokerServlet.deallocate=Impossible de d�sallouer une instance de servlet pour le chemin {0}
-invokerServlet.invalidPath=Aucun nom de servlet ou de classe n''a �t� sp�cifi� pour le chemin {0}
-invokerServlet.notNamed=Impossible d''appeler le d�l�gu� (invoker) de servlet avec un aiguilleur (dispatcher) nomm�
-invokerServlet.noWrapper=Le conteneur n''a pas appel� "setWrapper()" pour cette servlet
-webdavservlet.jaxpfailed=Erreur d''initialisation de JAXP
-directory.filename=Nom de fichier
-directory.lastModified=Derni�re modification
-directory.parent=Jusqu''� {0}
-directory.size=Taille
-directory.title=Liste du r�pertoire pour {0}
-directory.version=Tomcat Catalina version 4.0
-
Deleted: trunk/src/main/java/org/apache/catalina/servlets/LocalStrings_ja.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/servlets/LocalStrings_ja.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/servlets/LocalStrings_ja.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,18 +0,0 @@
-defaultservlet.directorylistingfor=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e00\u89a7:
-defaultservlet.upto=\u89aa\u30c7\u30a3\u30ec\u30af\u30c8\u30ea:
-defaultservlet.subdirectories=\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea:
-defaultservlet.files=\u30d5\u30a1\u30a4\u30eb:
-invokerServlet.allocate=\u30d1\u30b9 {0} \u306b\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u5272\u308a\u5f53\u3066\u3089\u308c\u307e\u305b\u3093
-invokerServlet.cannotCreate=\u30d1\u30b9 {0} \u306b\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u30e9\u30c3\u30d1\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093
-invokerServlet.deallocate=\u30d1\u30b9 {0} \u306e\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5272\u308a\u5f53\u3066\u3092\u89e3\u9664\u3067\u304d\u307e\u305b\u3093
-invokerServlet.invalidPath=\u30d1\u30b9 {0} \u306b\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u540d\u53c8\u306f\u30af\u30e9\u30b9\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-invokerServlet.notNamed=\u305d\u306e\u540d\u524d\u306e\u30c7\u30a3\u30b9\u30d1\u30c3\u30c1\u30e3\u3067\u30a4\u30f3\u30dc\u30fc\u30ab\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u3092\u547c\u3073\u51fa\u305b\u307e\u305b\u3093
-invokerServlet.noWrapper=\u30b3\u30f3\u30c6\u30ca\u306f\u3053\u306e\u30b5\u30fc\u30d6\u30ec\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u547c\u3073\u51fa\u3055\u308c\u305fsetWrapper()\u3092\u6301\u3063\u3066\u3044\u307e\u305b\u3093
-webdavservlet.jaxpfailed=JAXP\u306e\u521d\u671f\u5316\u306b\u5931\u6557\u3057\u307e\u3057\u305f
-directory.filename=\u30d5\u30a1\u30a4\u30eb\u540d
-directory.lastModified=\u6700\u7d42\u66f4\u65b0
-directory.parent={0} \u306b\u79fb\u52d5
-directory.size=\u30b5\u30a4\u30ba
-directory.title={0} \u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u4e00\u89a7
-directory.version=Tomcat Catalina \u30d0\u30fc\u30b8\u30e7\u30f3 4.0
-
Modified: trunk/src/main/java/org/apache/catalina/servlets/WebdavServlet.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/servlets/WebdavServlet.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/servlets/WebdavServlet.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -19,6 +19,8 @@
package org.apache.catalina.servlets;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.StringReader;
@@ -299,8 +301,7 @@
documentBuilder.setEntityResolver(
new WebdavResolver(this.getServletContext()));
} catch(ParserConfigurationException e) {
- throw new ServletException
- (sm.getString("webdavservlet.jaxpfailed"));
+ throw new ServletException(MESSAGES.jaxpInitializationFailed());
}
return documentBuilder;
}
@@ -2799,8 +2800,7 @@
}
public InputSource resolveEntity (String publicId, String systemId) {
- context.log(sm.getString("webdavservlet.enternalEntityIgnored",
- publicId, systemId));
+ context.log(MESSAGES.ignoredExternalEntity(publicId, systemId));
return new InputSource(
new StringReader("Ignored external entity"));
}
Modified: trunk/src/main/java/org/apache/catalina/startup/Constants.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/startup/Constants.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/startup/Constants.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -29,8 +29,6 @@
public final class Constants {
- public static final String Package = "org.apache.catalina.startup";
-
public static final String ApplicationContextXml = "META-INF/context.xml";
public static final String ApplicationWebXml = "/WEB-INF/web.xml";
public static final String DefaultContextXml = "conf/context.xml";
Modified: trunk/src/main/java/org/apache/catalina/startup/ContextConfig.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/startup/ContextConfig.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/startup/ContextConfig.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -82,7 +82,7 @@
import org.apache.catalina.deploy.LoginConfig;
import org.apache.catalina.deploy.SecurityCollection;
import org.apache.catalina.deploy.SecurityConstraint;
-import org.apache.catalina.util.StringManager;
+import org.jboss.web.CatalinaLogger;
/**
* Startup event listener for a <b>Context</b> that configures the properties
@@ -96,9 +96,6 @@
public class ContextConfig
implements LifecycleListener {
- protected static org.jboss.logging.Logger log=
- org.jboss.logging.Logger.getLogger( ContextConfig.class );
-
// ----------------------------------------------------- Instance Variables
@@ -129,13 +126,6 @@
/**
- * The string resources for this package.
- */
- protected static final StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- /**
* Deployment count.
*/
protected static long deploymentCount = 0L;
@@ -170,12 +160,7 @@
public void lifecycleEvent(LifecycleEvent event) {
// Identify the context we are associated with
- try {
- context = (Context) event.getLifecycle();
- } catch (ClassCastException e) {
- log.error(sm.getString("contextConfig.cce", event.getLifecycle()), e);
- return;
- }
+ context = (Context) event.getLifecycle();
// Process the event that has occurred
if (event.getType().equals(Lifecycle.START_EVENT)) {
@@ -260,7 +245,7 @@
// Has a Realm been configured for us to authenticate against?
if (context.getRealm() == null) {
- log.error(sm.getString("contextConfig.missingRealm"));
+ CatalinaLogger.STARTUP_LOGGER.noRealmFound();
ok = false;
return;
}
@@ -284,14 +269,12 @@
authenticators = new Properties();
authenticators.load(is);
} else {
- log.error(sm.getString(
- "contextConfig.authenticatorResources"));
+ CatalinaLogger.STARTUP_LOGGER.cannotFindAuthenticatoMappings();
ok=false;
return;
}
} catch (IOException e) {
- log.error(sm.getString(
- "contextConfig.authenticatorResources"), e);
+ CatalinaLogger.STARTUP_LOGGER.failedLoadingAuthenticatoMappings(e);
ok = false;
return;
}
@@ -302,8 +285,7 @@
authenticatorName =
authenticators.getProperty(loginConfig.getAuthMethod());
if (authenticatorName == null) {
- log.error(sm.getString("contextConfig.authenticatorMissing",
- loginConfig.getAuthMethod()));
+ CatalinaLogger.STARTUP_LOGGER.noAuthenticatorForAuthMethod(loginConfig.getAuthMethod());
ok = false;
return;
}
@@ -313,10 +295,7 @@
Class authenticatorClass = Class.forName(authenticatorName);
authenticator = (Valve) authenticatorClass.newInstance();
} catch (Throwable t) {
- log.error(sm.getString(
- "contextConfig.authenticatorInstantiate",
- authenticatorName),
- t);
+ CatalinaLogger.STARTUP_LOGGER.failedLoadingAuthenticator(authenticatorName, t);
ok = false;
}
}
@@ -328,11 +307,7 @@
Pipeline pipeline = ((ContainerBase) context).getPipeline();
if (pipeline != null) {
((ContainerBase) context).addValve(authenticator);
- if (log.isDebugEnabled()) {
- log.debug(sm.getString(
- "contextConfig.authenticatorConfigured",
- loginConfig.getAuthMethod()));
- }
+ CatalinaLogger.STARTUP_LOGGER.authenticatorConfigured(loginConfig.getAuthMethod());
}
}
@@ -385,8 +360,6 @@
* Process a "init" event for this Context.
*/
protected void init() {
- if (log.isDebugEnabled())
- log.debug(sm.getString("contextConfig.init"));
context.setConfigured(false);
ok = true;
}
@@ -405,9 +378,6 @@
protected void start() {
// Called from StandardContext.start()
- if (log.isDebugEnabled())
- log.debug(sm.getString("contextConfig.start"));
-
// Process the default and application web.xml files
if (ok) {
defaultWebConfig();
@@ -434,25 +404,25 @@
}
// Dump the contents of this pipeline if requested
- if ((log.isDebugEnabled()) && (context instanceof ContainerBase)) {
- log.debug("Pipeline Configuration:");
+ if ((CatalinaLogger.STARTUP_LOGGER.isDebugEnabled()) && (context instanceof ContainerBase)) {
+ CatalinaLogger.STARTUP_LOGGER.debug("Pipeline Configuration:");
Pipeline pipeline = ((ContainerBase) context).getPipeline();
Valve valves[] = null;
if (pipeline != null)
valves = pipeline.getValves();
if (valves != null) {
for (int i = 0; i < valves.length; i++) {
- log.debug(" " + valves[i].getInfo());
+ CatalinaLogger.STARTUP_LOGGER.debug(" " + valves[i].getInfo());
}
}
- log.debug("======================");
+ CatalinaLogger.STARTUP_LOGGER.debug("======================");
}
// Make our application available if no problems were encountered
if (ok) {
context.setConfigured(true);
} else {
- log.error(sm.getString("contextConfig.unavailable"));
+ CatalinaLogger.STARTUP_LOGGER.contextUnavailable();
context.setConfigured(false);
}
@@ -470,9 +440,6 @@
*/
protected void stop() {
- if (log.isDebugEnabled())
- log.debug(sm.getString("contextConfig.stop"));
-
int i;
// Removing children
@@ -579,8 +546,6 @@
*/
protected void destroy() {
// Called from StandardContext.destroy()
- if (log.isDebugEnabled())
- log.debug(sm.getString("contextConfig.destroy"));
// Changed to getWorkPath per Bugzilla 35819.
String workDir = ((StandardContext) context).getWorkPath();
@@ -740,7 +705,7 @@
for (int j = 0; j < roles.length; j++) {
if (!"*".equals(roles[j]) &&
!context.findSecurityRole(roles[j])) {
- log.info(sm.getString("contextConfig.role.auth", roles[j]));
+ CatalinaLogger.STARTUP_LOGGER.roleValidationAuth(roles[j]);
context.addSecurityRole(roles[j]);
}
}
@@ -752,14 +717,14 @@
Wrapper wrapper = (Wrapper) wrappers[i];
String runAs = wrapper.getRunAs();
if ((runAs != null) && !context.findSecurityRole(runAs)) {
- log.info(sm.getString("contextConfig.role.runas", runAs));
+ CatalinaLogger.STARTUP_LOGGER.roleValidationRunAs(runAs);
context.addSecurityRole(runAs);
}
String names[] = wrapper.findSecurityReferences();
for (int j = 0; j < names.length; j++) {
String link = wrapper.findSecurityReference(names[j]);
if ((link != null) && !context.findSecurityRole(link)) {
- log.info(sm.getString("contextConfig.role.link", link));
+ CatalinaLogger.STARTUP_LOGGER.roleValidationLink(link);
context.addSecurityRole(link);
}
}
Modified: trunk/src/main/java/org/apache/catalina/startup/EngineConfig.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/startup/EngineConfig.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/startup/EngineConfig.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -23,7 +23,6 @@
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
-import org.apache.catalina.util.StringManager;
/**
@@ -37,10 +36,6 @@
public class EngineConfig
implements LifecycleListener {
-
- protected static org.jboss.logging.Logger log=
- org.jboss.logging.Logger.getLogger( EngineConfig.class );
-
// ----------------------------------------------------- Instance Variables
@@ -50,13 +45,6 @@
protected Engine engine = null;
- /**
- * The string resources for this package.
- */
- protected static final StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
// --------------------------------------------------------- Public Methods
@@ -68,12 +56,7 @@
public void lifecycleEvent(LifecycleEvent event) {
// Identify the engine we are associated with
- try {
- engine = (Engine) event.getLifecycle();
- } catch (ClassCastException e) {
- log.error(sm.getString("engineConfig.cce", event.getLifecycle()), e);
- return;
- }
+ engine = (Engine) event.getLifecycle();
// Process the event that has occurred
if (event.getType().equals(Lifecycle.START_EVENT))
@@ -91,10 +74,6 @@
* Process a "start" event for this Engine.
*/
protected void start() {
-
- if (engine.getLogger().isDebugEnabled())
- engine.getLogger().debug(sm.getString("engineConfig.start"));
-
}
@@ -102,10 +81,6 @@
* Process a "stop" event for this Engine.
*/
protected void stop() {
-
- if (engine.getLogger().isDebugEnabled())
- engine.getLogger().debug(sm.getString("engineConfig.stop"));
-
}
Modified: trunk/src/main/java/org/apache/catalina/startup/ExpandWar.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/startup/ExpandWar.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/startup/ExpandWar.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -18,16 +18,13 @@
package org.apache.catalina.startup;
-import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.io.InputStream;
import java.nio.channels.FileChannel;
-import org.apache.catalina.util.StringManager;
-import org.jboss.logging.Logger;
+import org.jboss.web.CatalinaLogger;
/**
* Expand out a WAR in a Host's appBase.
@@ -40,16 +37,7 @@
public class ExpandWar {
- private static Logger log = Logger.getLogger(ExpandWar.class);
-
/**
- * The string resources for this package.
- */
- protected static final StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- /**
* Copy the specified file or directory to the destination.
*
* @param src File object representing the source
@@ -83,8 +71,7 @@
oc = (new FileOutputStream(fileDest)).getChannel();
ic.transferTo(0, ic.size(), oc);
} catch (IOException e) {
- log.error(sm.getString
- ("expandWar.copy", fileSrc, fileDest), e);
+ CatalinaLogger.STARTUP_LOGGER.fileCopyError(fileSrc, fileDest, e);
result = false;
} finally {
if (ic != null) {
@@ -138,8 +125,7 @@
}
}
if (logFailure && !result) {
- log.error(sm.getString(
- "expandWar.deleteFailed", dir.getAbsolutePath()));
+ CatalinaLogger.STARTUP_LOGGER.fileDeleteError(dir.getAbsolutePath());
}
return result;
}
@@ -186,8 +172,7 @@
}
if (logFailure && !result) {
- log.error(sm.getString(
- "expandWar.deleteFailed", dir.getAbsolutePath()));
+ CatalinaLogger.STARTUP_LOGGER.fileDeleteError(dir.getAbsolutePath());
}
return result;
Deleted: trunk/src/main/java/org/apache/catalina/startup/HomesUserDatabase.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/startup/HomesUserDatabase.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/startup/HomesUserDatabase.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,144 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.apache.catalina.startup;
-
-
-import java.io.File;
-import java.util.Hashtable;
-import java.util.Enumeration;
-
-
-/**
- * Concrete implementation of the <strong>UserDatabase</code> interface
- * considers all directories in a directory whose pathname is specified
- * to our constructor to be "home" directories for those users.
- *
- * @author Craig R. McClanahan
- * @version $Revision: 515 $ $Date: 2008-03-17 22:02:23 +0100 (Mon, 17 Mar 2008) $
- */
-
-public final class HomesUserDatabase
- implements UserDatabase {
-
-
- // --------------------------------------------------------- Constructors
-
-
- /**
- * Initialize a new instance of this user database component.
- */
- public HomesUserDatabase() {
-
- super();
-
- }
-
-
- // --------------------------------------------------- Instance Variables
-
-
- /**
- * The set of home directories for all defined users, keyed by username.
- */
- private Hashtable homes = new Hashtable();
-
-
- /**
- * The UserConfig listener with which we are associated.
- */
- private UserConfig userConfig = null;
-
-
- // ----------------------------------------------------------- Properties
-
-
- /**
- * Return the UserConfig listener with which we are associated.
- */
- public UserConfig getUserConfig() {
-
- return (this.userConfig);
-
- }
-
-
- /**
- * Set the UserConfig listener with which we are associated.
- *
- * @param userConfig The new UserConfig listener
- */
- public void setUserConfig(UserConfig userConfig) {
-
- this.userConfig = userConfig;
- init();
-
- }
-
-
- // ------------------------------------------------------- Public Methods
-
-
- /**
- * Return an absolute pathname to the home directory for the specified user.
- *
- * @param user User for which a home directory should be retrieved
- */
- public String getHome(String user) {
-
- return ((String) homes.get(user));
-
- }
-
-
- /**
- * Return an enumeration of the usernames defined on this server.
- */
- public Enumeration getUsers() {
-
- return (homes.keys());
-
- }
-
-
- // ------------------------------------------------------ Private Methods
-
-
- /**
- * Initialize our set of users and home directories.
- */
- private void init() {
-
- String homeBase = userConfig.getHomeBase();
- File homeBaseDir = new File(homeBase);
- if (!homeBaseDir.exists() || !homeBaseDir.isDirectory())
- return;
- String homeBaseFiles[] = homeBaseDir.list();
-
- for (int i = 0; i < homeBaseFiles.length; i++) {
- File homeDir = new File(homeBaseDir, homeBaseFiles[i]);
- if (!homeDir.isDirectory() || !homeDir.canRead())
- continue;
- homes.put(homeBaseFiles[i], homeDir.toString());
- }
-
-
- }
-
-
-}
Modified: trunk/src/main/java/org/apache/catalina/startup/HostConfig.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/startup/HostConfig.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/startup/HostConfig.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -22,19 +22,13 @@
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Set;
-import javax.management.ObjectName;
-
import org.apache.catalina.Container;
import org.apache.catalina.Engine;
import org.apache.catalina.Host;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
-import org.apache.catalina.util.StringManager;
-import org.apache.tomcat.util.modeler.Registry;
/**
@@ -48,9 +42,6 @@
public class HostConfig
implements LifecycleListener {
- protected static org.jboss.logging.Logger log=
- org.jboss.logging.Logger.getLogger( HostConfig.class );
-
// ----------------------------------------------------- Instance Variables
@@ -85,13 +76,6 @@
/**
- * The string resources for this package.
- */
- protected static final StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- /**
* List of applications which are being serviced, and shouldn't be
* deployed/undeployed/redeployed at the moment.
*/
@@ -156,12 +140,7 @@
public void lifecycleEvent(LifecycleEvent event) {
// Identify the context we are associated with
- try {
- host = (Host) event.getLifecycle();
- } catch (ClassCastException e) {
- log.error(sm.getString("hostConfig.cce", event.getLifecycle()), e);
- return;
- }
+ host = (Host) event.getLifecycle();
if (event.getType().equals(Lifecycle.PERIODIC_EVENT))
check();
@@ -267,10 +246,6 @@
* Process a "start" event for this Host.
*/
public void start() {
-
- if (log.isDebugEnabled())
- log.debug(sm.getString("hostConfig.start"));
-
}
@@ -279,9 +254,6 @@
*/
public void stop() {
- if (log.isDebugEnabled())
- log.debug(sm.getString("hostConfig.stop"));
-
undeployApps();
appBase = null;
@@ -294,10 +266,6 @@
* Undeploy all deployed applications.
*/
protected void undeployApps() {
-
- if (log.isDebugEnabled())
- log.debug(sm.getString("hostConfig.undeploying"));
-
}
Deleted: trunk/src/main/java/org/apache/catalina/startup/LocalStrings.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/startup/LocalStrings.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/startup/LocalStrings.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,93 +0,0 @@
-contextConfig.applicationClose=Error closing application web.xml
-contextConfig.applicationConfig=Configuration error in application web.xml
-contextConfig.applicationListener=Exception creating listener of class {0}
-contextConfig.applicationMissing=Missing application web.xml, using defaults only
-contextConfig.applicationParse=Parse error in application web.xml file at {0}
-contextConfig.applicationPosition=Occurred at line {0} column {1}
-contextConfig.authenticatorConfigured=Configured an authenticator for method {0}
-contextConfig.authenticatorInstantiate=Cannot instantiate an authenticator of class {0}
-contextConfig.authenticatorMissing=Cannot configure an authenticator for method {0}
-contextConfig.authenticatorResources=Cannot load authenticators mapping list
-contextConfig.cce=Lifecycle event data object {0} is not a Context
-contextConfig.certificatesConfig.added=Added certificates -> request attribute Valve
-contextConfig.certificatesConfig.error=Exception adding CertificatesValve:
-contextConfig.contextClose=Error closing context.xml
-contextConfig.contextMissing=Missing context.xml: {0}
-contextConfig.contextParse=Parse error in context.xml for {0}
-contextConfig.defaultClose=Error closing default web.xml
-contextConfig.defaultConfig=Configuration error in default web.xml
-contextConfig.defaultMissing=Missing default web.xml, using application web.xml only
-contextConfig.defaultParse=Parse error in default web.xml
-contextConfig.defaultPosition=Occurred at line {0} column {1}
-contextConfig.fixDocBase=Exception fixing docBase: {0}
-contextConfig.fragmentOrderingParse=Failed to parse web fragment ordering for {0}
-contextConfig.init=ContextConfig: Initializing
-contextConfig.invalidAbsoluteOrder=Invalid absolute order
-contextConfig.missingRealm=No Realm has been configured to authenticate against
-contextConfig.noOverlay=Overlay used in {0} requires a ProxyDirContext in the context
-contextConfig.role.auth=WARNING: Security role name {0} used in an <auth-constraint> without being defined in a <security-role>
-contextConfig.role.link=WARNING: Security role name {0} used in a <role-link> without being defined in a <security-role>
-contextConfig.role.runas=WARNING: Security role name {0} used in a <run-as> without being defined in a <security-role>
-contextConfig.scan=Error scanning context resources
-contextConfig.servletContainerInitializer=Error running Servlet container initializer {0}
-contextConfig.start=ContextConfig: Processing START
-contextConfig.stop=ContextConfig: Processing STOP
-contextConfig.tldEntryException=Exception processing TLD {0} in JAR at resource path {1} in context {2}
-contextConfig.tldFileException=Exception processing TLD at resource path {0} in context {1}
-contextConfig.tldJarException=Exception processing JAR at resource path {0} in context {1}
-contextConfig.tldResourcePath=Invalid TLD resource path {0}
-contextConfig.unavailable=Marking this application unavailable due to previous error(s)
-contextConfig.altDDNotFound=alt-dd file {0} not found
-embedded.alreadyStarted=Embedded service has already been started
-embedded.noEngines=No engines have been defined yet
-embedded.notmp=Cannot find specified temporary folder at {0}
-embedded.notStarted=Embedded service has not yet been started
-embedded.authenticatorNotInstanceOfValve=Specified Authenticator is not a Valve
-engineConfig.cce=Lifecycle event data object {0} is not an Engine
-engineConfig.start=EngineConfig: Processing START
-engineConfig.stop=EngineConfig: Processing STOP
-expandWar.copy=Error copying {0} to {1}
-expandWar.deleteFailed=[{0}] could not be completely deleted. The presence of the remaining files may cause problems
-expandWar.illegalPath=The archive [{0}] is malformed and will be ignored: an entry contains an illegal path [{1}]
-hostConfig.appBase=Application base directory {0} does not exist
-hostConfig.canonicalizing=Error delete redeploy resources from context [{0}]
-hostConfig.cce=Lifecycle event data object {0} is not a Host
-hostConfig.context.destroy=Error during context [{0}] destroy
-hostConfig.context.remove=Error while removing context [{0}]
-hostConfig.context.restart=Error during context [{0}] restart
-hostConfig.deploy=Deploying web application directory {0}
-hostConfig.deployDescriptor=Deploying configuration descriptor {0}
-hostConfig.deployDescriptor.error=Error deploying configuration descriptor {0}
-hostConfig.deployDescriptor.localDocBaseSpecified=A docBase {0} inside the host appBase has been specified, and will be ignored
-hostConfig.deployDir=Deploying web application directory {0}
-hostConfig.deployDir.error=Error deploying web application directory {0}
-hostConfig.deployJar=Deploying web application archive {0}
-hostConfig.deployJar.error=Error deploying web application archive {0}
-hostConfig.deploy.error=Exception while deploying web application directory {0}
-hostConfig.deploying=Deploying discovered web applications
-hostConfig.expand=Expanding web application archive {0}
-hostConfig.expand.error=Exception while expanding web application archive {0}
-hostConfig.expanding=Expanding discovered web application archives
-hostConfig.illegalWarName=The war name [{0}] is invalid. The archive will be ignored.
-hostConfig.jmx.register=Register context [{0}] failed
-hostConfig.jmx.unregister=Unregister context [{0}] failed
-hostConfig.reload=Reloading context [{0}]
-hostConfig.removeXML=Context [{0}] is undeployed
-hostConfig.removeDIR=Directory {0} is undeployed
-hostConfig.removeWAR=War {0} is undeployed
-hostConfig.start=HostConfig: Processing START
-hostConfig.stop=HostConfig: Processing STOP
-hostConfig.undeploy=Undeploying context [{0}]
-hostConfig.undeploy.error=Error undeploying web application at context path {0}
-hostConfig.undeploying=Undeploying deployed web applications
-userConfig.database=Exception loading user database
-userConfig.deploy=Deploying web application for user {0}
-userConfig.deploying=Deploying user web applications
-userConfig.error=Error deploying web application for user {0}
-userConfig.start=UserConfig: Processing START
-userConfig.stop=UserConfig: Processing STOP
-
-ordering.afterAndBeforeOthers=Jar fragment {0} contains an invalid ordering specifying both after and before other fragments
-ordering.duplicateName=Jar fragment {0} declares a duplicate name
-ordering.unkonwnName=Jar fragment {0} ordering refers to an unknown fragment name
-ordering.orderConflict=Jar fragment {0} causes an order conflict
Deleted: trunk/src/main/java/org/apache/catalina/startup/LocalStrings_es.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/startup/LocalStrings_es.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/startup/LocalStrings_es.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,94 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-contextConfig.applicationClose = Error durante el cierre del archivo web.xml de la aplicaci\u00F3n
-contextConfig.applicationConfig = Error de configuraci\u00F3n en el archivo web.xml de la aplicaci\u00F3n
-contextConfig.applicationListener = Excepci\u00F3n durante la creaci\u00F3n de la clase de escucha (listener) {0}
-contextConfig.applicationMissing = Falta el archivo web.xml de la aplicaci\u00F3n. Utilizando los par\u00E1metros por defecto
-contextConfig.applicationParse = Error de evaluaci\u00F3n (parse) en el archivo web.xml de la aplicaci\u00F3n a {0}
-contextConfig.applicationPosition = Se ha producido en la l\u00EDnea {0} columna {1}
-contextConfig.authenticatorConfigured = Configuraci\u00F3n de un autentificador (authenticator) para el m\u00E9todo {0}
-contextConfig.authenticatorInstantiate = Imposible de instanciar un autenticador (authenticator) para la clase {0}
-contextConfig.authenticatorMissing = Imposible de configurar un autentificador (authenticator) para el m\u00E9todo {0}
-contextConfig.authenticatorResources = Imposible de cargar la lista de correspondencia de autenticadores (authenticators)
-contextConfig.cce = El objeto de los datos de evento de ciclo de vida (Lifecycle event data object) {0} no es un Contexto
-contextConfig.certificatesConfig.added = Adici\u00F3n de certificados -> requiere v\u00E1lvula de atributo (attribute Valve)
-contextConfig.certificatesConfig.error = Excepci\u00F3n durante la adici\u00F3n de "CertificatesValve"\:
-contextConfig.contextClose = Error cerrando context.xml\: {0}
-contextConfig.contextMissing = Falta context.xml\: {0}
-contextConfig.contextParse = Error de an\u00E1lisis en context.xml\: {0}
-contextConfig.defaultClose = Error durante el cierre del archivo web.xml por defecto
-contextConfig.defaultConfig = Error de configuraci\u00F3n en el archivo web.xml por defecto
-contextConfig.defaultMissing = Falta el archivo web.xml por defecto, utilizando s\u00F3lo el archivo web.xml de la aplicaci\u00F3n
-contextConfig.defaultParse = Error de evaluaci\u00F3n (parse) en el arcivo web.xml por defecto
-contextConfig.defaultPosition = Se ha producido en la l\u00EDnea {0} columna {1}
-contextConfig.fixDocBase = Excepci\u00F3n arreglando docBase\: {0}
-contextConfig.init = ContextConfig\: Inicializando
-contextConfig.missingRealm = Alg\u00FAn reino (realm) no ha sido configurado para realizar la autenticaci\u00F3n
-contextConfig.role.auth = ATENCI\u00D3N\: El nombre de papel de seguridad {0} es usado en un <auth-constraint> sin haber sido definido en <security-role>
-contextConfig.role.link = ATENCI\u00D3N\: El nombre de papel de seguridad {0} es usado en un <role-link> sin haber sido definido en <security-role>
-contextConfig.role.runas = ATENCI\u00D3N\: El nombre de papel de seguridad {0} es usado en un <run-as> sin haber sido definido en <security-role>
-contextConfig.start = "ContextConfig"\: Tratamiento del "START"
-contextConfig.stop = "ContextConfig"\: Tratamiento del "STOP"
-contextConfig.tldEntryException = Excepci\u00F3n durante el tratamiento de la TLD {0} en el JAR indicado por la trayectoria de recurso {1} en contexto {2}
-contextConfig.tldFileException = Excepci\u00F3n durante el tratamiento de la TLD indicada por la trayectoria de recurso {0} en contexto {1}
-contextConfig.tldJarException = Excepci\u00F3n durante el tratamiento del JAR indicado por la trayectoria de recurso {0} en contexto {1}
-contextConfig.tldResourcePath = Trayectoria de recurso TLD {0} inv\u00E1lida
-contextConfig.unavailable = Esta aplicaci\u00F3n est\u00E1 marcada como no disponible debido a los errores precedentes
-contextConfig.altDDNotFound = fichero alt-dd {0} no hallado
-embedded.alreadyStarted = El servicio embebido (embedded service) ya ha sido arrancado
-embedded.noEngines = Alg\u00FAn motor (engine) no ha sido a\u00FAn definido
-embedded.notmp = No puedo hallar carpeta temporal especificada en {0}
-embedded.notStarted = El servicio embebido (embedded service) a\u00FAn no ha sido arrancado
-embedded.authenticatorNotInstanceOfValve = El Autenticado especificado no es un V\u00E1lvula
-engineConfig.cce = El objeto de los datos de evento de ciclo de vida (Lifecycle event data object) {0} no es un motor (engine)
-engineConfig.start = "EngineConfig"\: Tratamiento del "START"
-engineConfig.stop = "EngineConfig"\: Tratamiento del "STOP"
-expandWar.copy = Error copiando {0} a {1}
-hostConfig.appBase = No existe el directorio base de la aplicaci\u00F3n {0}
-hostConfig.canonicalizing = Error al borrar redespliegue de recursos desde contexto [{0}]
-hostConfig.cce = El objeto de los datos de evento de ciclo de vida (Lifecycle event data object) {0} no es una m\u00E1quina (host)
-hostConfig.context.destroy = Error al destruir contexto [{0}]
-hostConfig.context.remove = Error al quitar contexto [{0}]
-hostConfig.context.restart = Error durante el arranque del contexto {0}
-hostConfig.deploy = Desplieque del directorio {0} de la aplicaci\u00F3n web
-hostConfig.deployDescriptor = Desplieque del descriptor de configuraci\u00F3n {0}
-hostConfig.deployDescriptor.error = Error durante el despliegue del descriptor de configuraci\u00F3n {0}
-hostConfig.deployDescriptor.localDocBaseSpecified = Se ha especificado un docBase {0} dentro del appBase de la m\u00E1quina y ser\u00E1 ignorado
-hostConfig.deployDir = Despliegue del directorio {0} de la aplicaci\u00F3n web
-hostConfig.deployDir.error = Error durante el despliegue del directorio {0} de la aplicaci\u00F3n web
-hostConfig.deployJar = Despliegue del archivo {0} de la aplicaci\u00F3n web
-hostConfig.deployJar.error = Error durante el despliegue del archivo {0} de la aplicaci\u00F3n web
-hostConfig.deploy.error = Excepci\u00F3n en el directorio {0} de la aplicaci\u00F3n web
-hostConfig.deploying = Desplegando aplicaciones web descubiertas
-hostConfig.expand = Descompresi\u00F3n del archivo {0} de la aplicaci\u00F3n web
-hostConfig.expand.error = Excepci\u00F3n durante la descompresi\u00F3n del archivo {0} de la aplicaci\u00F3n web
-hostConfig.expanding = Descubierta descompresi\u00F3n de archivos de aplicaciones web
-hostConfig.jmx.register = Fall\u00F3 el registro del contexto [{0}]
-hostConfig.jmx.unregister = Fall\u00F3 el desregistro del contexto [{0}]
-hostConfig.reload = Fall\u00F3 la recarga del contexto [{0}]
-hostConfig.removeXML = El context [{0}] est\u00E1 replegado
-hostConfig.removeDIR = El directorio [{0}] est\u00E1 replegado
-hostConfig.removeWAR = El War [{0}] est\u00E1 replegado
-hostConfig.start = "HostConfig"\: Tratamiento del "START"
-hostConfig.stop = "HostConfig"\: Tratamiento del "STOP"
-hostConfig.undeploy = Repliegue (undeploy) de la aplicaci\u00F3n web que tiene como trayectoria de contexto {0}
-hostConfig.undeploy.error = Error durante el repliegue (undeploy) de la aplicaci\u00F3n web que tiene como trayectoria de contexto {0}
-hostConfig.undeploying = Repliegue de las aplicaciones web desplegadas
-userConfig.database = Excepci\u00F3n durante la carga de base de datos de usuario
-userConfig.deploy = Despliegue de la aplicaci\u00F3n web para el usuario {0}
-userConfig.deploying = Desplegando aplicaciones web para el usuario
-userConfig.error = Error durante el despliegue de la aplicaci\u00F3n web para el usario {0}
-userConfig.start = "UserConfig"\: Tratamiento del "START"
-userConfig.stop = "UserConfig"\: Tratamiento del "STOP"
Deleted: trunk/src/main/java/org/apache/catalina/startup/LocalStrings_fr.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/startup/LocalStrings_fr.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/startup/LocalStrings_fr.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,59 +0,0 @@
-contextConfig.applicationClose=Erreur lors de la fermeture du fichier web.xml de l''application
-contextConfig.applicationConfig=Erreur de configuration dans le fichier web.xml de l''application
-contextConfig.applicationListener=Exception lors de la cr�ation de la classe d''�coute (listener) {0}
-contextConfig.applicationMissing=Le fichier web.xml de l''application est absent, utilisation des param�tres par d�faut
-contextConfig.applicationParse=Erreur d''�valuation (parse) dans le fichier web.xml de l''application � {0}
-contextConfig.applicationPosition=S''est produite � la ligne {0} colonne {1}
-contextConfig.authenticatorConfigured=Configuration d''un authentificateur (authenticator) pour la m�thode {0}
-contextConfig.authenticatorInstantiate=Impossible d''instancier un authentificateur (authenticator) pour la classe {0}
-contextConfig.authenticatorMissing=Impossible de configurer un authentificateur (authenticator) pour la m�thode {0}
-contextConfig.authenticatorResources=Impossible de charger la liste de correspondance des authentificateur (authenticators)
-contextConfig.cce=L''objet donn�e �v�nement cycle de vie (Lifecycle event data object) {0} n''est pas un Contexte
-contextConfig.certificatesConfig.added=Ajout de certificats -> requ�te Attribut de Valve (attribute Valve)
-contextConfig.certificatesConfig.error=Exception lors de l''ajout des "CertificatesValve":
-contextConfig.defaultClose=Erreur lors de la fermeture du fichier web.xml par d�faut
-contextConfig.defaultConfig=Erreur de configuration dans le fichier web.xml par d�faut
-contextConfig.defaultMissing=Le fichier web.xml par d�faut est absent, utilisation du fichier web.xml de l''application web.xml seulement
-contextConfig.defaultParse=Erreur d''�valuation (parse) dans le fichier web.xml par d�faut
-contextConfig.defaultPosition=S''est produite � la ligne {0} colonne {1}
-contextConfig.missingRealm=Aucun royaume (realm) n''a �t� configur� pour r�aliser l''authentification
-contextConfig.role.auth=ATTENTION: Le nom de r�le de s�curit� {0} est utilis� dans un <auth-constraint> sans avoir �t� d�fini dans <security-role>
-contextConfig.role.link=ATTENTION: Le nom de r�le de s�curit� {0} est utilis� dans un <role-link> sans avoir �t� d�fini dans <security-role>
-contextConfig.role.runas=ATTENTION: Le nom de r�le de s�curit� {0} est utilis� dans un <run-as> sans avoir �t� d�fini dans <security-role>
-contextConfig.start="ContextConfig": Traitement du "START"
-contextConfig.stop="ContextConfig": Traitement du "STOP"
-contextConfig.tldEntryException=Exception lors du traitement de la TLD {0} dans le JAR indiqu� par le chemin de ressource {1} dans le contexte {2}
-contextConfig.tldFileException=Exception lors du traitement de la TLD indiqu� par le chemin de ressource {0} dans le contexte {1}
-contextConfig.tldJarException=Exception lors du traitement du JAR indiqu� par le chemin de ressource {0} dans le contexte {1}
-contextConfig.tldResourcePath=Chemin de ressource TLD {0} invalide
-contextConfig.unavailable=Cette application est marqu�e comme non disponible suite aux erreurs pr�c�dentes
-embedded.alreadyStarted=Le service enfoui (embedded service) a d�j� �t� d�marr�
-embedded.noEngines=Aucun moteur (engine) n''a encore �t� d�fini
-embedded.notStarted=Le service enfoui (embedded service) n''a pas encore �t� d�marr�
-engineConfig.cce=L''objet donn�e �v�nement cycle de vie (Lifecycle event data object) {0} n''est pas un moteur (engine)
-engineConfig.start="EngineConfig": Traitement du "START"
-engineConfig.stop="EngineConfig": Traitement du "STOP"
-hostConfig.cce=L''objet donn�e �v�nement cycle de vie (Lifecycle event data object) {0} n''est pas un h�te
-hostConfig.deploy=D�ploiement du r�pertoire {0} de l''application web
-hostConfig.deployDescriptor=D�ploiement du descripteur de configuration {0}
-hostConfig.deployDescriptor.error=Erreur lors du d�ploiement du descripteur de configuration {0}
-hostConfig.deployDir=D�ploiement du r�pertoire {0} de l''application web
-hostConfig.deployDir.error=Erreur lors du d�ploiement du r�pertoire {0} de l''application web
-hostConfig.deployJar=D�ploiement de l''archive {0} de l''application web
-hostConfig.deployJar.error=Erreur lors du d�ploiement de l''archive {0} de l''application web
-hostConfig.deploy.error=Exception lors du r�pertoire {0} de l''application web
-hostConfig.deploying=D�ploiement des applications web d�couvertes (discovered)
-hostConfig.expand=D�compression de l''archive {0} de l''application web
-hostConfig.expand.error=Exception lors de la d�compression de l''archive {0} de l''application web
-hostConfig.expanding=D�compression des archives des applications web d�couvertes (discovered)
-hostConfig.start="HostConfig": Traitement du "START"
-hostConfig.stop="HostConfig": Traitement du "STOP"
-hostConfig.undeploy=Repli (undeploy) de l''application web ayant pour chemin de contexte {0}
-hostConfig.undeploy.error=Erreur lors du repli (undeploy) de l''application web ayant pour chemin de contexte {0}
-hostConfig.undeploying=Repli des applications web d�ploy�es
-userConfig.database=Exception lors du chargement de la base de donn�es utilisateur
-userConfig.deploy=D�ploiement de l''application web pour l''utilisateur {0}
-userConfig.deploying=D�ploiement des applications web utilisateur
-userConfig.error=Erreur lors du d�ploiement de l''application web pour l''utilisateur {0}
-userConfig.start="UserConfig": Traitement du "START"
-userConfig.stop="UserConfig": Traitement du "STOP"
Deleted: trunk/src/main/java/org/apache/catalina/startup/LocalStrings_ja.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/startup/LocalStrings_ja.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/startup/LocalStrings_ja.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,64 +0,0 @@
-contextConfig.applicationClose=\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eweb.xml\u3092\u30af\u30ed\u30fc\u30ba\u4e2d\u306e\u30a8\u30e9\u30fc\u3067\u3059
-contextConfig.applicationConfig=\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eweb.xml\u306e\u8a2d\u5b9a\u30a8\u30e9\u30fc\u3067\u3059
-contextConfig.applicationListener=\u30af\u30e9\u30b9 {0} \u306e\u30ea\u30b9\u30ca\u3092\u4f5c\u6210\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-contextConfig.applicationMissing=\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eweb.xml\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3060\u3051\u3092\u4f7f\u7528\u3057\u307e\u3059
-contextConfig.applicationParse=\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eweb.xml\u30d5\u30a1\u30a4\u30eb {0} \u306e\u89e3\u6790\u30a8\u30e9\u30fc\u3067\u3059
-contextConfig.applicationPosition={0}\u884c\u306e{1}\u5217\u76ee\u3067\u767a\u751f\u3057\u307e\u3057\u305f
-contextConfig.authenticatorConfigured=\u30e1\u30bd\u30c3\u30c9 {0} \u306e\u30aa\u30fc\u30bb\u30f3\u30c6\u30a3\u30b1\u30fc\u30bf\u3092\u8a2d\u5b9a\u3057\u307e\u3059
-contextConfig.authenticatorInstantiate=\u30af\u30e9\u30b9 {0} \u306e\u30aa\u30fc\u30bb\u30f3\u30c6\u30a3\u30b1\u30fc\u30bf\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3067\u304d\u307e\u305b\u3093
-contextConfig.authenticatorMissing=\u30e1\u30bd\u30c3\u30c9 {0} \u306e\u30aa\u30fc\u30bb\u30f3\u30c6\u30a3\u30b1\u30fc\u30bf\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093
-contextConfig.authenticatorResources=\u30aa\u30fc\u30bb\u30f3\u30c6\u30a3\u30b1\u30fc\u30bf\u306e\u30de\u30c3\u30d7\u30ea\u30b9\u30c8\u3092\u30ed\u30fc\u30c9\u3067\u304d\u307e\u305b\u3093
-contextConfig.cce=\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u30a4\u30d9\u30f3\u30c8\u30c7\u30fc\u30bf\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 {0} \u306f\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3067\u306f\u3042\u308a\u307e\u305b\u3093
-contextConfig.certificatesConfig.added=\u8a3c\u660e\u66f8\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u5c5e\u6027\u5024\u306b\u8ffd\u52a0\u3057\u307e\u3059
-contextConfig.certificatesConfig.error=CertificatesValve\u3092\u8ffd\u52a0\u4e2d\u306b\u4f8b\u5916\u304c\u767a\u751f\u3057\u307e\u3057\u305f:
-contextConfig.defaultClose=\u30c7\u30d5\u30a9\u30eb\u30c8\u306eweb.xml\u306e\u30af\u30ed\u30fc\u30ba\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
-contextConfig.defaultConfig=\u30c7\u30d5\u30a9\u30eb\u30c8\u306eweb.xml\u306e\u4e2d\u306e\u8a2d\u5b9a\u30a8\u30e9\u30fc\u3067\u3059
-contextConfig.defaultMissing=\u30c7\u30d5\u30a9\u30eb\u30c8\u306eweb.xml\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306eweb.xml\u3060\u3051\u3092\u4f7f\u7528\u3057\u307e\u3059
-contextConfig.defaultParse=\u30c7\u30d5\u30a9\u30eb\u30c8\u306eweb.xml\u4e2d\u306e\u89e3\u6790\u30a8\u30e9\u30fc\u3067\u3059
-contextConfig.defaultPosition={0}\u884c\u306e{1}\u5217\u76ee\u3067\u767a\u751f\u3057\u307e\u3057\u305f
-contextConfig.missingRealm=\u8a8d\u8a3c\u3059\u308b\u305f\u3081\u306b\u30ec\u30eb\u30e0\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-contextConfig.role.auth=\u8b66\u544a: <security-role>\u306b\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3044\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ed\u30fc\u30eb\u540d {0} \u304c<auth-constraint>\u306e\u4e2d\u3067\u4f7f\u7528\u3055\u308c\u307e\u3057\u305f
-contextConfig.role.link=\u8b66\u544a: <security-role>\u306b\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3044\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ed\u30fc\u30eb\u540d {0} \u304c<role-link>\u306e\u4e2d\u3067\u4f7f\u7528\u3055\u308c\u307e\u3057\u305f
-contextConfig.role.runas=\u8b66\u544a: <security-role>\u306b\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3044\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30ed\u30fc\u30eb\u540d {0} \u304c<run-as>\u306e\u4e2d\u3067\u4f7f\u7528\u3055\u308c\u307e\u3057\u305f
-contextConfig.start=ContextConfig: \u51e6\u7406\u3092\u958b\u59cb\u3057\u307e\u3059
-contextConfig.stop=ContextConfig: \u51e6\u7406\u3092\u505c\u6b62\u3057\u307e\u3059
-contextConfig.tldEntryException=\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8 {2} \u306e\u30ea\u30bd\u30fc\u30b9\u30d1\u30b9 {1} \u306eJAR\u30d5\u30a1\u30a4\u30eb\u306eTLD {0} \u3092\u51e6\u7406\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-contextConfig.tldFileException=\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8 {1} \u306e\u30ea\u30bd\u30fc\u30b9\u30d1\u30b9 {0} \u306eTLD\u3092\u51e6\u7406\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-contextConfig.tldJarException=\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8 {1} \u306e\u30ea\u30bd\u30fc\u30b9\u30d1\u30b9 {0} \u306eJAR\u30d5\u30a1\u30a4\u30eb\u3092\u51e6\u7406\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-contextConfig.tldResourcePath=\u7121\u52b9\u306aTLD\u306e\u30ea\u30bd\u30fc\u30b9\u30d1\u30b9 {0}
-contextConfig.unavailable=\u524d\u306e\u30a8\u30e9\u30fc\u306e\u305f\u3081\u306b\u3053\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u5229\u7528\u3067\u304d\u306a\u3044\u3088\u3046\u306b\u30de\u30fc\u30af\u3057\u307e\u3059
-embedded.alreadyStarted=\u7d44\u307f\u8fbc\u307f\u30b5\u30fc\u30d3\u30b9\u306f\u65e2\u306b\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u3059
-embedded.noEngines=\u307e\u3060\u30a8\u30f3\u30b8\u30f3\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-embedded.notStarted=\u7d44\u307f\u8fbc\u307f\u30b5\u30fc\u30d3\u30b9\u306f\u307e\u3060\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-engineConfig.cce=\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u30a4\u30d9\u30f3\u30c8\u30c7\u30fc\u30bf\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 {0} \u306f\u30a8\u30f3\u30b8\u30f3\u3067\u306f\u3042\u308a\u307e\u305b\u3093
-engineConfig.start=EngineConfig: \u51e6\u7406\u3092\u958b\u59cb\u3057\u307e\u3059
-engineConfig.stop=EngineConfig: \u51e6\u7406\u3092\u505c\u6b62\u3057\u307e\u3059
-hostConfig.appBase=\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d9\u30fc\u30b9\u30c7\u30a3\u30ec\u30af\u30c8\u30ea {0} \u306f\u5b58\u5728\u3057\u307e\u305b\u3093
-hostConfig.cce=\u30e9\u30a4\u30d5\u30b5\u30a4\u30af\u30eb\u30a4\u30d9\u30f3\u30c8\u30c7\u30fc\u30bf\u30aa\u30d6\u30b8\u30a7\u30af\u30c8 {0} \u306f\u30db\u30b9\u30c8\u3067\u306f\u3042\u308a\u307e\u305b\u3093
-hostConfig.deploy=Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30a3\u30ec\u30af\u30c8\u30ea {0} \u3092\u914d\u5099\u3057\u307e\u3059
-hostConfig.deployDescriptor=\u8a2d\u5b9a\u8a18\u8ff0\u5b50 {0} \u3092\u914d\u5099\u3057\u307e\u3059
-hostConfig.deployDescriptor.error=\u8a2d\u5b9a\u8a18\u8ff0\u5b50 {0} \u3092\u914d\u5099\u4e2d\u306e\u30a8\u30e9\u30fc\u3067\u3059
-hostConfig.deployDir=Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30a3\u30ec\u30af\u30c8\u30ea {0} \u3092\u914d\u5099\u3057\u307e\u3059
-hostConfig.deployDir.error=Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30a3\u30ec\u30af\u30c8\u30ea {0} \u3092\u914d\u5099\u4e2d\u306e\u30a8\u30e9\u30fc\u3067\u3059
-hostConfig.deployJar=Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30a2\u30fc\u30ab\u30a4\u30d6 {0} \u3092\u914d\u5099\u3057\u307e\u3059
-hostConfig.deployJar.error=Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30a2\u30fc\u30ab\u30a4\u30d6 {0} \u3092\u914d\u5099\u4e2d\u306e\u30a8\u30e9\u30fc\u3067\u3059
-hostConfig.deploy.error=Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30a3\u30ec\u30af\u30c8\u30ea {0} \u3092\u914d\u5099\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-hostConfig.deploying=\u898b\u3064\u304b\u3063\u305fWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u914d\u5099\u3057\u307e\u3059
-hostConfig.expand=Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30a2\u30fc\u30ab\u30a4\u30d6 {0} \u3092\u5c55\u958b\u3057\u307e\u3059
-hostConfig.expand.error=Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30a2\u30fc\u30ab\u30a4\u30d6 {0} \u3092\u5c55\u958b\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-hostConfig.expanding=\u898b\u3064\u304b\u3063\u305fWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u5c55\u958b\u3057\u307e\u3059
-hostConfig.context.restart=\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8 {0} \u3092\u518d\u8d77\u52d5\u4e2d\u306e\u30a8\u30e9\u30fc\u3067\u3059
-hostConfig.removeXML=\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8 {0} \u306e\u914d\u5099\u3092\u89e3\u9664\u3057\u307e\u3057\u305f
-hostConfig.removeDIR=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea {0} \u306e\u914d\u5099\u3092\u89e3\u9664\u3057\u307e\u3057\u305f
-hostConfig.removeWAR=WAR\u30d5\u30a1\u30a4\u30eb {0} \u306e\u914d\u5099\u3092\u89e3\u9664\u3057\u307e\u3057\u305f
-hostConfig.start=HostConfig: \u51e6\u7406\u3092\u505c\u6b62\u3057\u307e\u3059
-hostConfig.stop=HostConfig: \u51e6\u7406\u3092\u505c\u6b62\u3057\u307e\u3059
-hostConfig.undeploy=\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9 {0} \u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u914d\u5099\u3092\u89e3\u9664\u3057\u307e\u3059
-hostConfig.undeploy.error=\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30d1\u30b9 {0} \u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u914d\u5099\u3092\u89e3\u9664\u4e2d\u306e\u30a8\u30e9\u30fc\u3067\u3059
-hostConfig.undeploying=\u914d\u5099\u3055\u308c\u305fWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u914d\u5099\u3092\u89e3\u9664\u3057\u3066\u3044\u307e\u3059
-userConfig.database=\u30e6\u30fc\u30b6\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30ed\u30fc\u30c9\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-userConfig.deploy=\u30e6\u30fc\u30b6 {0} \u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u914d\u5099\u3057\u307e\u3059
-userConfig.deploying=\u30e6\u30fc\u30b6\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u914d\u5099\u3057\u307e\u3059
-userConfig.error=\u30e6\u30fc\u30b6 {0} \u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u914d\u5099\u4e2d\u306e\u30a8\u30e9\u30fc\u3067\u3059
-userConfig.start=UserConfig: \u51e6\u7406\u3092\u958b\u59cb\u3057\u307e\u3059
-userConfig.stop=UserConfig: \u51e6\u7406\u3092\u505c\u6b62\u3057\u307e\u3059
Deleted: trunk/src/main/java/org/apache/catalina/startup/PasswdUserDatabase.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/startup/PasswdUserDatabase.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/startup/PasswdUserDatabase.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,194 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.apache.catalina.startup;
-
-
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.Hashtable;
-import java.util.Enumeration;
-
-
-/**
- * Concrete implementation of the <strong>UserDatabase</code> interface
- * that processes the <code>/etc/passwd</code> file on a Unix system.
- *
- * @author Craig R. McClanahan
- * @version $Revision: 1237 $ $Date: 2009-11-03 02:55:48 +0100 (Tue, 03 Nov 2009) $
- */
-
-public final class PasswdUserDatabase
- implements UserDatabase {
-
-
- // --------------------------------------------------------- Constructors
-
-
- /**
- * Initialize a new instance of this user database component.
- */
- public PasswdUserDatabase() {
-
- super();
-
- }
-
-
- // --------------------------------------------------- Instance Variables
-
-
- /**
- * The pathname of the Unix password file.
- */
- private static final String PASSWORD_FILE = "/etc/passwd";
-
-
- /**
- * The set of home directories for all defined users, keyed by username.
- */
- private Hashtable homes = new Hashtable();
-
-
- /**
- * The UserConfig listener with which we are associated.
- */
- private UserConfig userConfig = null;
-
-
- // ----------------------------------------------------------- Properties
-
-
- /**
- * Return the UserConfig listener with which we are associated.
- */
- public UserConfig getUserConfig() {
-
- return (this.userConfig);
-
- }
-
-
- /**
- * Set the UserConfig listener with which we are associated.
- *
- * @param userConfig The new UserConfig listener
- */
- public void setUserConfig(UserConfig userConfig) {
-
- this.userConfig = userConfig;
- init();
-
- }
-
-
- // ------------------------------------------------------- Public Methods
-
-
- /**
- * Return an absolute pathname to the home directory for the specified user.
- *
- * @param user User for which a home directory should be retrieved
- */
- public String getHome(String user) {
-
- return ((String) homes.get(user));
-
- }
-
-
- /**
- * Return an enumeration of the usernames defined on this server.
- */
- public Enumeration getUsers() {
-
- return (homes.keys());
-
- }
-
-
- // ------------------------------------------------------ Private Methods
-
-
- /**
- * Initialize our set of users and home directories.
- */
- private void init() {
-
- BufferedReader reader = null;
- try {
-
- reader = new BufferedReader(new FileReader(PASSWORD_FILE));
-
- while (true) {
-
- // Accumulate the next line
- StringBuilder buffer = new StringBuilder();
- while (true) {
- int ch = reader.read();
- if ((ch < 0) || (ch == '\n'))
- break;
- buffer.append((char) ch);
- }
- String line = buffer.toString();
- if (line.length() < 1)
- break;
-
- // Parse the line into constituent elements
- int n = 0;
- String tokens[] = new String[7];
- for (int i = 0; i < tokens.length; i++)
- tokens[i] = null;
- while (n < tokens.length) {
- String token = null;
- int colon = line.indexOf(':');
- if (colon >= 0) {
- token = line.substring(0, colon);
- line = line.substring(colon + 1);
- } else {
- token = line;
- line = "";
- }
- tokens[n++] = token;
- }
-
- // Add this user and corresponding directory
- if ((tokens[0] != null) && (tokens[5] != null))
- homes.put(tokens[0], tokens[5]);
-
- }
-
- reader.close();
- reader = null;
-
- } catch (Exception e) {
- if (reader != null) {
- try {
- reader.close();
- } catch (IOException f) {
- ;
- }
- reader = null;
- }
- }
-
- }
-
-
-}
Deleted: trunk/src/main/java/org/apache/catalina/startup/UserConfig.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/startup/UserConfig.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/startup/UserConfig.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,339 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.apache.catalina.startup;
-
-
-import java.io.File;
-import java.util.Enumeration;
-
-import org.apache.catalina.Context;
-import org.apache.catalina.Host;
-import org.apache.catalina.Lifecycle;
-import org.apache.catalina.LifecycleEvent;
-import org.apache.catalina.LifecycleListener;
-import org.apache.catalina.util.StringManager;
-
-
-/**
- * Startup event listener for a <b>Host</b> that configures Contexts (web
- * applications) for all defined "users" who have a web application in a
- * directory with the specified name in their home directories. The context
- * path of each deployed application will be set to <code>~xxxxx</code>, where
- * xxxxx is the username of the owning user for that web application
- *
- * @author Craig R. McClanahan
- * @version $Revision: 515 $ $Date: 2008-03-17 22:02:23 +0100 (Mon, 17 Mar 2008) $
- */
-
-public final class UserConfig
- implements LifecycleListener {
-
-
- private static org.jboss.logging.Logger log=
- org.jboss.logging.Logger.getLogger( UserConfig.class );
-
-
- // ----------------------------------------------------- Instance Variables
-
-
- /**
- * The Java class name of the Context configuration class we should use.
- */
- private String configClass = "org.apache.catalina.startup.ContextConfig";
-
-
- /**
- * The Java class name of the Context implementation we should use.
- */
- private String contextClass = "org.apache.catalina.core.StandardContext";
-
-
- /**
- * The directory name to be searched for within each user home directory.
- */
- private String directoryName = "public_html";
-
-
- /**
- * The base directory containing user home directories.
- */
- private String homeBase = null;
-
-
- /**
- * The Host we are associated with.
- */
- private Host host = null;
-
-
- /**
- * The string resources for this package.
- */
- private static final StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- /**
- * The Java class name of the user database class we should use.
- */
- private String userClass =
- "org.apache.catalina.startup.PasswdUserDatabase";
-
-
- // ------------------------------------------------------------- Properties
-
-
- /**
- * Return the Context configuration class name.
- */
- public String getConfigClass() {
-
- return (this.configClass);
-
- }
-
-
- /**
- * Set the Context configuration class name.
- *
- * @param configClass The new Context configuration class name.
- */
- public void setConfigClass(String configClass) {
-
- this.configClass = configClass;
-
- }
-
-
- /**
- * Return the Context implementation class name.
- */
- public String getContextClass() {
-
- return (this.contextClass);
-
- }
-
-
- /**
- * Set the Context implementation class name.
- *
- * @param contextClass The new Context implementation class name.
- */
- public void setContextClass(String contextClass) {
-
- this.contextClass = contextClass;
-
- }
-
-
- /**
- * Return the directory name for user web applications.
- */
- public String getDirectoryName() {
-
- return (this.directoryName);
-
- }
-
-
- /**
- * Set the directory name for user web applications.
- *
- * @param directoryName The new directory name
- */
- public void setDirectoryName(String directoryName) {
-
- this.directoryName = directoryName;
-
- }
-
-
- /**
- * Return the base directory containing user home directories.
- */
- public String getHomeBase() {
-
- return (this.homeBase);
-
- }
-
-
- /**
- * Set the base directory containing user home directories.
- *
- * @param homeBase The new base directory
- */
- public void setHomeBase(String homeBase) {
-
- this.homeBase = homeBase;
-
- }
-
-
- /**
- * Return the user database class name for this component.
- */
- public String getUserClass() {
-
- return (this.userClass);
-
- }
-
-
- /**
- * Set the user database class name for this component.
- */
- public void setUserClass(String userClass) {
-
- this.userClass = userClass;
-
- }
-
-
- // --------------------------------------------------------- Public Methods
-
-
- /**
- * Process the START event for an associated Host.
- *
- * @param event The lifecycle event that has occurred
- */
- public void lifecycleEvent(LifecycleEvent event) {
-
- // Identify the host we are associated with
- try {
- host = (Host) event.getLifecycle();
- } catch (ClassCastException e) {
- log.error(sm.getString("hostConfig.cce", event.getLifecycle()), e);
- return;
- }
-
- // Process the event that has occurred
- if (event.getType().equals(Lifecycle.START_EVENT))
- start();
- else if (event.getType().equals(Lifecycle.STOP_EVENT))
- stop();
-
- }
-
-
- // -------------------------------------------------------- Private Methods
-
-
- /**
- * Deploy a web application for any user who has a web application present
- * in a directory with a specified name within their home directory.
- */
- private void deploy() {
-
- if (host.getLogger().isDebugEnabled())
- host.getLogger().debug(sm.getString("userConfig.deploying"));
-
- // Load the user database object for this host
- UserDatabase database = null;
- try {
- Class clazz = Class.forName(userClass);
- database = (UserDatabase) clazz.newInstance();
- database.setUserConfig(this);
- } catch (Exception e) {
- host.getLogger().error(sm.getString("userConfig.database"), e);
- return;
- }
-
- // Deploy the web application (if any) for each defined user
- Enumeration users = database.getUsers();
- while (users.hasMoreElements()) {
- String user = (String) users.nextElement();
- String home = database.getHome(user);
- deploy(user, home);
- }
-
- }
-
-
- /**
- * Deploy a web application for the specified user if they have such an
- * application in the defined directory within their home directory.
- *
- * @param user Username owning the application to be deployed
- * @param home Home directory of this user
- */
- private void deploy(String user, String home) {
-
- // Does this user have a web application to be deployed?
- String contextPath = "/~" + user;
- if (host.findChild(contextPath) != null)
- return;
- File app = new File(home, directoryName);
- if (!app.exists() || !app.isDirectory())
- return;
- /*
- File dd = new File(app, "/WEB-INF/web.xml");
- if (!dd.exists() || !dd.isFile() || !dd.canRead())
- return;
- */
- host.getLogger().info(sm.getString("userConfig.deploy", user));
-
- // Deploy the web application for this user
- try {
- Class clazz = Class.forName(contextClass);
- Context context =
- (Context) clazz.newInstance();
- context.setPath(contextPath);
- context.setDocBase(app.toString());
- if (context instanceof Lifecycle) {
- clazz = Class.forName(configClass);
- LifecycleListener listener =
- (LifecycleListener) clazz.newInstance();
- ((Lifecycle) context).addLifecycleListener(listener);
- }
- host.addChild(context);
- } catch (Exception e) {
- host.getLogger().error(sm.getString("userConfig.error", user), e);
- }
-
- }
-
-
- /**
- * Process a "start" event for this Host.
- */
- private void start() {
-
- if (host.getLogger().isDebugEnabled())
- host.getLogger().debug(sm.getString("userConfig.start"));
-
- deploy();
-
- }
-
-
- /**
- * Process a "stop" event for this Host.
- */
- private void stop() {
-
- if (host.getLogger().isDebugEnabled())
- host.getLogger().debug(sm.getString("userConfig.stop"));
-
- }
-
-
-}
Deleted: trunk/src/main/java/org/apache/catalina/startup/UserDatabase.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/startup/UserDatabase.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/startup/UserDatabase.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.apache.catalina.startup;
-
-
-import java.util.Enumeration;
-
-
-/**
- * Abstraction of the set of users defined by the operating system on the
- * current server platform.
- *
- * @author Craig R. McClanahan
- * @version $Revision: 515 $ $Date: 2008-03-17 22:02:23 +0100 (Mon, 17 Mar 2008) $
- */
-
-public interface UserDatabase {
-
-
- // ----------------------------------------------------------- Properties
-
-
- /**
- * Return the UserConfig listener with which we are associated.
- */
- public UserConfig getUserConfig();
-
-
- /**
- * Set the UserConfig listener with which we are associated.
- *
- * @param userConfig The new UserConfig listener
- */
- public void setUserConfig(UserConfig userConfig);
-
-
- // ------------------------------------------------------- Public Methods
-
-
- /**
- * Return an absolute pathname to the home directory for the specified user.
- *
- * @param user User for which a home directory should be retrieved
- */
- public String getHome(String user);
-
-
- /**
- * Return an enumeration of the usernames defined on this server.
- */
- public Enumeration getUsers();
-
-
-}
Modified: trunk/src/main/java/org/apache/catalina/util/HexUtils.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/util/HexUtils.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/util/HexUtils.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -18,6 +18,8 @@
package org.apache.catalina.util;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.ByteArrayOutputStream;
/**
@@ -53,13 +55,6 @@
/**
- * The string manager for this package.
- */
- private static StringManager sm =
- StringManager.getManager("org.apache.catalina.util");
-
-
- /**
* Convert a String of hexadecimal digits into the corresponding
* byte array by encoding each two hexadecimal digits as a byte.
*
@@ -75,8 +70,7 @@
for (int i = 0; i < digits.length(); i += 2) {
char c1 = digits.charAt(i);
if ((i+1) >= digits.length())
- throw new IllegalArgumentException
- (sm.getString("hexUtil.odd"));
+ throw MESSAGES.oddNomberOfHexDigits();
char c2 = digits.charAt(i + 1);
byte b = 0;
if ((c1 >= '0') && (c1 <= '9'))
@@ -86,8 +80,7 @@
else if ((c1 >= 'A') && (c1 <= 'F'))
b += ((c1 - 'A' + 10) * 16);
else
- throw new IllegalArgumentException
- (sm.getString("hexUtil.bad"));
+ throw MESSAGES.badHexDigit();
if ((c2 >= '0') && (c2 <= '9'))
b += (c2 - '0');
else if ((c2 >= 'a') && (c2 <= 'f'))
@@ -95,8 +88,7 @@
else if ((c2 >= 'A') && (c2 <= 'F'))
b += (c2 - 'A' + 10);
else
- throw new IllegalArgumentException
- (sm.getString("hexUtil.bad"));
+ throw MESSAGES.badHexDigit();
baos.write(b);
}
return (baos.toByteArray());
@@ -138,19 +130,19 @@
int len;
if(hex.length < 4 ) return 0;
if( DEC[hex[0]]<0 )
- throw new IllegalArgumentException(sm.getString("hexUtil.bad"));
+ throw MESSAGES.badHexDigit();
len = DEC[hex[0]];
len = len << 4;
if( DEC[hex[1]]<0 )
- throw new IllegalArgumentException(sm.getString("hexUtil.bad"));
+ throw MESSAGES.badHexDigit();
len += DEC[hex[1]];
len = len << 4;
if( DEC[hex[2]]<0 )
- throw new IllegalArgumentException(sm.getString("hexUtil.bad"));
+ throw MESSAGES.badHexDigit();
len += DEC[hex[2]];
len = len << 4;
if( DEC[hex[3]]<0 )
- throw new IllegalArgumentException(sm.getString("hexUtil.bad"));
+ throw MESSAGES.badHexDigit();
len += DEC[hex[3]];
return len;
}
Deleted: trunk/src/main/java/org/apache/catalina/util/LocalStrings.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/util/LocalStrings.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/util/LocalStrings.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,11 +0,0 @@
-parameterMap.locked=No modifications are allowed to a locked ParameterMap
-resourceSet.locked=No modifications are allowed to a locked ResourceSet
-hexUtil.bad=Bad hexadecimal digit
-hexUtil.odd=Odd number of hexadecimal digits
-#Default Messages Utilized by the ExtensionValidator
-extensionValidator.web-application-manifest=Web Application Manifest
-extensionValidator.extension-not-found-error=ExtensionValidator[{0}][{1}]: Required extension "{2}" not found.
-extensionValidator.extension-validation-error=ExtensionValidator[{0}]: Failure to find {1} required extension(s).
-extensionValidator.failload=Failure loading extension {0}
-SecurityUtil.doAsPrivilege=An exception occurs when running the PrivilegedExceptionAction block.
-
Deleted: trunk/src/main/java/org/apache/catalina/util/LocalStrings_es.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/util/LocalStrings_es.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/util/LocalStrings_es.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,24 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-parameterMap.locked = No se permiten modificaciones en un ParameterMap bloqueado
-resourceSet.locked = No se permiten modificaciones en un ResourceSet bloqueado
-hexUtil.bad = D\u00EDgito hexadecimal incorrecto
-hexUtil.odd = N\u00FAmero de d\u00EDgitos hexadecimales impar
-#Default Messages Utilized by the ExtensionValidator
-extensionValidator.web-application-manifest = Manifiesto de Aplicaci\u00F3n Web
-extensionValidator.extension-not-found-error = ExtensionValidator[{0}][{1}]\: La extensi\u00F3n no encuentra el "{2}" requerido.
-extensionValidator.extension-validation-error = ExtensionValidator[{0}]\: Imposible de hallar la(s) extension(es) {1} requerida(s).
-extensionValidator.failload = No pude cargar la extensi\u00F3n {0}
-SecurityUtil.doAsPrivilege = Una excepci\u00F3n se ha producido durante la ejecuci\u00F3n del bloque PrivilegedExceptionAction.
Deleted: trunk/src/main/java/org/apache/catalina/util/LocalStrings_fr.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/util/LocalStrings_fr.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/util/LocalStrings_fr.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,10 +0,0 @@
-parameterMap.locked=Aucune modification n''est authoris�e sur un ParameterMap v�rrouill�
-resourceSet.locked=Aucune modification n''est authoris�e sur un ResourceSet v�rrouill�
-hexUtil.bad=Mauvais digit hexadecimal
-hexUtil.odd=Nombre impair de digits hexadecimaux
-#Default Messages Utilized by the ExtensionValidator
-extensionValidator.web-application-manifest=Web Application Manifest
-extensionValidator.extension-not-found-error=ExtensionValidator[{0}][{1}]: L''extension requise "{2}" est introuvable.
-extensionValidator.extension-validation-error=ExtensionValidator[{0}]: Impossible de trouver {1} extension(s) requise(s).
-SecurityUtil.doAsPrivilege=Une exception s''est produite lors de l''execution du bloc PrivilegedExceptionAction.
-
Deleted: trunk/src/main/java/org/apache/catalina/util/LocalStrings_ja.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/util/LocalStrings_ja.properties 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/util/LocalStrings_ja.properties 2012-08-30 17:19:13 UTC (rev 2075)
@@ -1,11 +0,0 @@
-parameterMap.locked=\u30ed\u30c3\u30af\u3055\u308c\u305fParameterMap\u306f\u5909\u66f4\u304c\u8a31\u3055\u308c\u307e\u305b\u3093
-resourceSet.locked=\u30ed\u30c3\u30af\u3055\u308c\u305fResourceSet\u306f\u5909\u66f4\u304c\u8a31\u3055\u308c\u307e\u305b\u3093
-hexUtil.bad=\u7121\u52b9\u306a16\u9032\u6570\u5024\u3067\u3059
-hexUtil.odd=\u5947\u6570\u6841\u306e16\u9032\u6570\u5024\u3067\u3059
-#Default Messages Utilized by the ExtensionValidator
-extensionValidator.web-application-manifest=Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30de\u30cb\u30d5\u30a7\u30b9\u30c8
-extensionValidator.extension-not-found-error=ExtensionValidator[{0}][{1}]: \u5fc5\u8981\u306a\u62e1\u5f35 "{2}" \u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
-extensionValidator.extension-validation-error=ExtensionValidator[{0}]: \u5fc5\u8981\u306a\u62e1\u5f35 "{1}" \u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
-extensionValidator.failload=\u62e1\u5f35 {0} \u306e\u30ed\u30fc\u30c9\u306b\u5931\u6557\u3057\u307e\u3057\u305f
-SecurityUtil.doAsPrivilege=PrivilegedExceptionAction\u30d6\u30ed\u30c3\u30af\u3092\u5b9f\u884c\u4e2d\u306b\u4f8b\u5916\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002
-
Modified: trunk/src/main/java/org/apache/catalina/util/ParameterMap.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/util/ParameterMap.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/util/ParameterMap.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -19,6 +19,8 @@
package org.apache.catalina.util;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.util.HashMap;
import java.util.Map;
@@ -121,13 +123,6 @@
}
- /**
- * The string manager for this package.
- */
- private static final StringManager sm =
- StringManager.getManager("org.apache.catalina.util");
-
-
// --------------------------------------------------------- Public Methods
@@ -140,8 +135,7 @@
public void clear() {
if (locked)
- throw new IllegalStateException
- (sm.getString("parameterMap.locked"));
+ throw MESSAGES.lockedParameterMap();
super.clear();
}
@@ -163,8 +157,7 @@
public Object put(Object key, Object value) {
if (locked)
- throw new IllegalStateException
- (sm.getString("parameterMap.locked"));
+ throw MESSAGES.lockedParameterMap();
return (super.put(key, value));
}
@@ -182,8 +175,7 @@
public void putAll(Map map) {
if (locked)
- throw new IllegalStateException
- (sm.getString("parameterMap.locked"));
+ throw MESSAGES.lockedParameterMap();
super.putAll(map);
}
@@ -202,8 +194,7 @@
public Object remove(Object key) {
if (locked)
- throw new IllegalStateException
- (sm.getString("parameterMap.locked"));
+ throw MESSAGES.lockedParameterMap();
return (super.remove(key));
}
Modified: trunk/src/main/java/org/apache/catalina/util/ResourceSet.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/util/ResourceSet.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/apache/catalina/util/ResourceSet.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -19,6 +19,8 @@
package org.apache.catalina.util;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.util.Collection;
import java.util.HashSet;
@@ -121,13 +123,6 @@
}
- /**
- * The string manager for this package.
- */
- private static final StringManager sm =
- StringManager.getManager("org.apache.catalina.util");
-
-
// --------------------------------------------------------- Public Methods
@@ -142,8 +137,7 @@
public boolean add(Object o) {
if (locked)
- throw new IllegalStateException
- (sm.getString("resourceSet.locked"));
+ throw MESSAGES.lockedResourceSet();
return (super.add(o));
}
@@ -157,8 +151,7 @@
public void clear() {
if (locked)
- throw new IllegalStateException
- (sm.getString("resourceSet.locked"));
+ throw MESSAGES.lockedResourceSet();
super.clear();
}
@@ -175,8 +168,7 @@
public boolean remove(Object o) {
if (locked)
- throw new IllegalStateException
- (sm.getString("resourceSet.locked"));
+ throw MESSAGES.lockedResourceSet();
return (super.remove(o));
}
Modified: trunk/src/main/java/org/jboss/web/CatalinaLogger.java
===================================================================
--- trunk/src/main/java/org/jboss/web/CatalinaLogger.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/jboss/web/CatalinaLogger.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -27,6 +27,8 @@
import static org.jboss.logging.Logger.Level.WARN;
import static org.jboss.logging.Logger.Level.DEBUG;
+import java.io.File;
+
import org.jboss.logging.BasicLogger;
import org.jboss.logging.Cause;
import org.jboss.logging.LogMessage;
@@ -66,6 +68,16 @@
*/
CatalinaLogger CONNECTOR_LOGGER = Logger.getMessageLogger(CatalinaLogger.class, "org.apache.catalina.connector");
+ /**
+ * A logger with the category of the package name.
+ */
+ CatalinaLogger FILTERS_LOGGER = Logger.getMessageLogger(CatalinaLogger.class, "org.apache.catalina.filters");
+
+ /**
+ * A logger with the category of the package name.
+ */
+ CatalinaLogger STARTUP_LOGGER = Logger.getMessageLogger(CatalinaLogger.class, "org.apache.catalina.startup");
+
@LogMessage(level = WARN)
@Message(id = 1000, value = "A valid entry has been removed from client nonce cache to make room for new entries. A replay attack is now possible. To prevent the possibility of replay attacks, reduce nonceValidity or increase cnonceCacheSize. Further warnings of this type will be suppressed for 5 minutes.")
void digestCacheRemove();
@@ -170,4 +182,68 @@
@Message(id = 1024, value = "Exception thrown whilst processing POSTed parameters")
void exceptionProcessingParameters(@Cause Throwable t);
+ @LogMessage(level = DEBUG)
+ @Message(id = 1025, value = "Request [%s], can not apply ExpiresFilter on already committed response.")
+ void expiresResponseAlreadyCommitted(String uri);
+
+ @LogMessage(level = WARN)
+ @Message(id = 1026, value = "Unknown parameter %s with value %s is ignored.")
+ void expiresUnknownParameter(String name, String value);
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 1027, value = "Request [%s] with response status %s content-type %s, expiration header already defined")
+ void expiresHeaderAlreadyDefined(String uri, int statusCode, String contentType);
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 1028, value = "Request [%s] with response status %s content-type %s, skip expiration header generation for given status")
+ void expiresSkipStatusCode(String uri, int statusCode, String contentType);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1029, value = "Error copying %s to %s")
+ void fileCopyError(File src, File dest, @Cause Throwable t);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1030, value = "%s could not be completely deleted. The presence of the remaining files may cause problems")
+ void fileDeleteError(String delete);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1031, value = "No Realm has been configured to authenticate against")
+ void noRealmFound();
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1032, value = "Cannot load authenticators mapping list")
+ void cannotFindAuthenticatoMappings();
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1033, value = "Cannot load authenticators mapping list")
+ void failedLoadingAuthenticatoMappings(@Cause Throwable t);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1034, value = "Cannot configure an authenticator for method %s")
+ void noAuthenticatorForAuthMethod(String authMethod);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1035, value = "Cannot instantiate an authenticator of class %s")
+ void failedLoadingAuthenticator(String className, @Cause Throwable t);
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 1036, value = "Configured an authenticator for method %s")
+ void authenticatorConfigured(String authMethod);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1037, value = "Marking this application unavailable due to previous error(s)")
+ void contextUnavailable();
+
+ @LogMessage(level = INFO)
+ @Message(id = 1038, value = "Security role name %s used in an <auth-constraint> without being defined in a <security-role>")
+ void roleValidationAuth(String roleName);
+
+ @LogMessage(level = INFO)
+ @Message(id = 1039, value = "Security role name %s used in a <role-link> without being defined in a <security-role>")
+ void roleValidationRunAs(String roleName);
+
+ @LogMessage(level = INFO)
+ @Message(id = 1040, value = "Security role name %s used in a <run-as> without being defined in a <security-role>")
+ void roleValidationLink(String roleName);
+
}
Modified: trunk/src/main/java/org/jboss/web/CatalinaMessages.java
===================================================================
--- trunk/src/main/java/org/jboss/web/CatalinaMessages.java 2012-08-29 16:44:25 UTC (rev 2074)
+++ trunk/src/main/java/org/jboss/web/CatalinaMessages.java 2012-08-30 17:19:13 UTC (rev 2075)
@@ -217,7 +217,7 @@
@Message(id = 58, value = "The response object has been recycled and is no longer associated with this facade")
IllegalStateException nullResponseFacade();
- @Message(id = 60, value = "Stream closed")
+ @Message(id = 59, value = "Stream closed")
IOException streamClosed();
@Message(id = 64, value = "Error report")
@@ -265,6 +265,75 @@
@Message(id = 78, value = "Syntax error in request filter pattern %s")
String requestFilterValvePatternError(String pattern);
+ @Message(id = 79, value = "The property %s is not defined for filters of type %s")
+ String propertyNotFound(String property, String className);
+
+ @Message(id = 80, value = "Unable to create Random source using class %s")
+ String cannotCreateRandom(String className);
+
+ @Message(id = 81, value = "Unsupported startingPoint %s")
+ IllegalStateException expiresUnsupportedStartingPoint(String startingPoint);
+
+ @Message(id = 82, value = "Exception processing configuration parameter %s: %s")
+ String expiresExceptionProcessingParameter(String name, String value);
+
+ @Message(id = 83, value = "Starting point (access|now|modification|a<seconds>|m<seconds>) not found in directive %s")
+ IllegalStateException expiresStartingPointNotFound(String line);
+
+ @Message(id = 84, value = "Invalid starting point (access|now|modification|a<seconds>|m<seconds>) %s in directive %s")
+ IllegalStateException expiresInvalidStartingPoint(String token, String line);
+
+ @Message(id = 85, value = "Duration not found in directive %s")
+ IllegalStateException expiresDurationNotFound(String line);
+
+ @Message(id = 86, value = "Invalid duration (number) %s in directive %s")
+ IllegalStateException expiresInvalidDuration(String token, String line);
+
+ @Message(id = 87, value = "Duration unit not found after amount %s in directive %s")
+ IllegalStateException expiresDurationUnitNotFound(int amount, String line);
+
+ @Message(id = 86, value = "Invalid duration unit (years|months|weeks|days|hours|minutes|seconds) %s in directive %s")
+ IllegalStateException expiresInvalidDurationUnit(String token, String line);
+
+ @Message(id = 87, value = "Request filter invalid pattern %s")
+ IllegalArgumentException requestFilterInvalidPattern(String pattern, @Cause Throwable t);
+
+ @Message(id = 88, value = "The requested resource (%s) is not available")
+ String resourceNotAvailable(String resource);
+
+ @Message(id = 89, value = "Directory Listing For %s")
+ String listingDirectoryTitle(String directory);
+
+ @Message(id = 90, value = "Up To %s")
+ String listingDirectoryParent(String directory);
+
+ @Message(id = 91, value = "Filename")
+ String listingFilename();
+
+ @Message(id = 92, value = "Size")
+ String listingSize();
+
+ @Message(id = 93, value = "Last Modified")
+ String listingLastModified();
+
+ @Message(id = 94, value = "JAXP initialization failed")
+ String jaxpInitializationFailed();
+
+ @Message(id = 95, value = "Ignored external entity %s %s")
+ String ignoredExternalEntity(String publicId, String systemId);
+
+ @Message(id = 96, value = "No modifications are allowed to a locked ParameterMap")
+ IllegalStateException lockedParameterMap();
+
+ @Message(id = 97, value = "No modifications are allowed to a locked ResourceSet")
+ IllegalStateException lockedResourceSet();
+
+ @Message(id = 98, value = "Bad hexadecimal digit")
+ IllegalArgumentException badHexDigit();
+
+ @Message(id = 99, value = "Odd number of hexadecimal digits")
+ IllegalArgumentException oddNomberOfHexDigits();
+
@Message(id = 100, value = "The client may continue.")
String http100();
12 years, 4 months
JBossWeb SVN: r2074 - in trunk/src/main/java/org: jboss/web and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-08-29 12:44:25 -0400 (Wed, 29 Aug 2012)
New Revision: 2074
Removed:
trunk/src/main/java/org/apache/catalina/connector/LocalStrings.properties
trunk/src/main/java/org/apache/catalina/connector/LocalStrings_es.properties
trunk/src/main/java/org/apache/catalina/connector/LocalStrings_fr.properties
trunk/src/main/java/org/apache/catalina/connector/LocalStrings_ja.properties
Modified:
trunk/src/main/java/org/apache/catalina/connector/Connector.java
trunk/src/main/java/org/apache/catalina/connector/CoyoteAdapter.java
trunk/src/main/java/org/apache/catalina/connector/HttpEventImpl.java
trunk/src/main/java/org/apache/catalina/connector/InputBuffer.java
trunk/src/main/java/org/apache/catalina/connector/Request.java
trunk/src/main/java/org/apache/catalina/connector/RequestFacade.java
trunk/src/main/java/org/apache/catalina/connector/Response.java
trunk/src/main/java/org/apache/catalina/connector/ResponseFacade.java
trunk/src/main/java/org/jboss/web/CatalinaLogger.java
trunk/src/main/java/org/jboss/web/CatalinaMessages.java
Log:
New i18n for the connector package.
Modified: trunk/src/main/java/org/apache/catalina/connector/Connector.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/connector/Connector.java 2012-08-29 08:36:47 UTC (rev 2073)
+++ trunk/src/main/java/org/apache/catalina/connector/Connector.java 2012-08-29 16:44:25 UTC (rev 2074)
@@ -18,6 +18,8 @@
package org.apache.catalina.connector;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.util.HashMap;
import java.util.Set;
@@ -33,12 +35,11 @@
import org.apache.catalina.Service;
import org.apache.catalina.core.AprLifecycleListener;
import org.apache.catalina.util.LifecycleSupport;
-import org.apache.catalina.util.StringManager;
import org.apache.coyote.Adapter;
import org.apache.coyote.ProtocolHandler;
import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.modeler.Registry;
-import org.jboss.logging.Logger;
+import org.jboss.web.CatalinaLogger;
/**
@@ -53,9 +54,7 @@
public class Connector
implements Lifecycle, MBeanRegistration
{
- private static Logger log = Logger.getLogger(Connector.class);
-
/**
* Alternate flag to enable recycling of facades.
*/
@@ -86,9 +85,7 @@
Class<?> clazz = Class.forName(protocolHandlerClassName);
this.protocolHandler = (ProtocolHandler) clazz.newInstance();
} catch (Exception e) {
- throw new IllegalArgumentException
- (sm.getString
- ("coyoteConnector.protocolHandlerInstantiationFailed", e));
+ throw MESSAGES.protocolHandlerInstantiationFailed(e);
}
}
@@ -184,13 +181,6 @@
/**
- * The string manager for this package.
- */
- protected StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- /**
* Maximum size of a POST which will be automatically parsed by the
* container. 2MB by default.
*/
@@ -946,9 +936,8 @@
throws LifecycleException
{
if (initialized) {
- if(log.isInfoEnabled())
- log.info(sm.getString("coyoteConnector.alreadyInitialized"));
- return;
+ CatalinaLogger.CONNECTOR_LOGGER.connectorAlreadyInitialized();
+ return;
}
this.initialized = true;
@@ -962,10 +951,8 @@
.registerComponent(this, oname, null);
controller=oname;
} catch (Exception e) {
- log.error( "Error registering connector ", e);
+ CatalinaLogger.CONNECTOR_LOGGER.failedConnectorJmxRegistration(oname, e);
}
- if(log.isDebugEnabled())
- log.debug("Creating name for connector " + oname);
}
}
@@ -979,9 +966,7 @@
try {
protocolHandler.init();
} catch (Exception e) {
- throw new LifecycleException
- (sm.getString
- ("coyoteConnector.protocolHandlerInitializationFailed", e));
+ throw new LifecycleException(MESSAGES.protocolHandlerInitFailed(e));
}
}
@@ -994,8 +979,7 @@
try {
protocolHandler.pause();
} catch (Exception e) {
- log.error(sm.getString
- ("coyoteConnector.protocolHandlerPauseFailed"), e);
+ CatalinaLogger.CONNECTOR_LOGGER.protocolHandlerPauseFailed(e);
}
}
@@ -1008,8 +992,7 @@
try {
protocolHandler.resume();
} catch (Exception e) {
- log.error(sm.getString
- ("coyoteConnector.protocolHandlerResumeFailed"), e);
+ CatalinaLogger.CONNECTOR_LOGGER.protocolHandlerResumeFailed(e);
}
}
@@ -1025,8 +1008,7 @@
// Validate and update our current state
if (started ) {
- if(log.isInfoEnabled())
- log.info(sm.getString("coyoteConnector.alreadyStarted"));
+ CatalinaLogger.CONNECTOR_LOGGER.connectorAlreadyStarted();
return;
}
lifecycle.fireLifecycleEvent(START_EVENT, null);
@@ -1041,27 +1023,18 @@
Registry.getRegistry(null, null).registerComponent
(protocolHandler, createObjectName(this.domain,"ProtocolHandler"), null);
} catch (Exception ex) {
- log.error(sm.getString
- ("coyoteConnector.protocolRegistrationFailed"), ex);
+ CatalinaLogger.CONNECTOR_LOGGER.failedProtocolJmxRegistration(oname, ex);
}
} else {
- if(log.isInfoEnabled())
- log.info(sm.getString
- ("coyoteConnector.cannotRegisterProtocol"));
+ CatalinaLogger.CONNECTOR_LOGGER.failedProtocolJmxRegistration();
}
}
try {
protocolHandler.start();
} catch (Exception e) {
- String errPrefix = "";
- if(this.service != null) {
- errPrefix += "service.getName(): \"" + this.service.getName() + "\"; ";
- }
-
throw new LifecycleException
- (errPrefix + " " + sm.getString
- ("coyoteConnector.protocolHandlerStartFailed", e));
+ (MESSAGES.protocolHandlerStartFailed(e));
}
}
@@ -1076,7 +1049,7 @@
// Validate and update our current state
if (!started) {
- log.error(sm.getString("coyoteConnector.notStarted"));
+ CatalinaLogger.CONNECTOR_LOGGER.connectorNotStarted();
return;
}
@@ -1088,16 +1061,13 @@
Registry.getRegistry(null, null).unregisterComponent
(createObjectName(this.domain,"ProtocolHandler"));
} catch (MalformedObjectNameException e) {
- log.error( sm.getString
- ("coyoteConnector.protocolUnregistrationFailed"), e);
+ CatalinaLogger.CONNECTOR_LOGGER.failedProtocolJmxUnregistration(oname, e);
}
}
try {
protocolHandler.destroy();
} catch (Exception e) {
- throw new LifecycleException
- (sm.getString
- ("coyoteConnector.protocolHandlerDestroyFailed", e));
+ throw new LifecycleException(MESSAGES.protocolHandlerDestroyFailed(e));
}
}
@@ -1145,15 +1115,13 @@
stop();
}
} catch( Throwable t ) {
- log.error( "Unregistering - can't stop", t);
+ CatalinaLogger.CONNECTOR_LOGGER.connectorStopFailed(t);
}
}
public void destroy() throws Exception {
if (org.apache.tomcat.util.Constants.ENABLE_MODELER) {
if( oname!=null && controller==oname ) {
- if(log.isDebugEnabled())
- log.debug("Unregister itself " + oname );
Registry.getRegistry(null, null).unregisterComponent(oname);
}
}
Modified: trunk/src/main/java/org/apache/catalina/connector/CoyoteAdapter.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/connector/CoyoteAdapter.java 2012-08-29 08:36:47 UTC (rev 2073)
+++ trunk/src/main/java/org/apache/catalina/connector/CoyoteAdapter.java 2012-08-29 16:44:25 UTC (rev 2074)
@@ -54,13 +54,11 @@
import javax.servlet.SessionTrackingMode;
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;
import org.apache.catalina.connector.Request.AsyncListenerRegistration;
-import org.apache.catalina.util.StringManager;
import org.apache.catalina.util.URLEncoder;
import org.apache.coyote.ActionCode;
import org.apache.coyote.Adapter;
@@ -71,8 +69,8 @@
import org.apache.tomcat.util.http.Cookies;
import org.apache.tomcat.util.http.ServerCookie;
import org.apache.tomcat.util.net.SocketStatus;
-import org.jboss.logging.Logger;
import org.jboss.servlet.http.HttpEvent;
+import org.jboss.web.CatalinaLogger;
/**
@@ -87,7 +85,6 @@
public class CoyoteAdapter
implements Adapter
{
- private static Logger log = Logger.getLogger(CoyoteAdapter.class);
// -------------------------------------------------------------- Constants
@@ -129,13 +126,6 @@
/**
- * The string manager for this package.
- */
- protected StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- /**
* Encoder for the Location URL in HTTP redirects.
*/
protected static URLEncoder urlEncoder;
@@ -277,7 +267,7 @@
if (!error && read && request.ready()) {
// If this was a read and not all bytes have been read, or if no data
// was read from the connector, then it is an error
- log.error(sm.getString("coyoteAdapter.read"));
+ CatalinaLogger.CONNECTOR_LOGGER.servletDidNotReadAvailableData();
request.getEvent().setType(HttpEvent.EventType.ERROR);
error = true;
connector.getContainer().getPipeline().getFirst().event(request, response, request.getEvent());
@@ -297,7 +287,7 @@
return (!error);
} catch (Throwable t) {
if (!(t instanceof IOException)) {
- log.error(sm.getString("coyoteAdapter.service"), t);
+ CatalinaLogger.CONNECTOR_LOGGER.exceptionDuringService(t);
}
error = true;
return false;
@@ -390,7 +380,7 @@
try {
asyncListener.onComplete(asyncEvent);
} catch (Throwable t) {
- log.error(sm.getString("coyoteAdapter.complete", asyncListener.getClass()), t);
+ CatalinaLogger.CONNECTOR_LOGGER.exceptionDuringComplete(asyncListener.getClass().getName(), t);
}
}
}
@@ -405,7 +395,7 @@
} catch (IOException e) {
;
} catch (Throwable t) {
- log.error(sm.getString("coyoteAdapter.service"), t);
+ CatalinaLogger.CONNECTOR_LOGGER.exceptionDuringService(t);
} finally {
req.getRequestProcessor().setWorkerThreadName(null);
// Recycle the wrapper request and response
@@ -749,7 +739,7 @@
}
} catch (Exception e) {
// Ignore
- log.error("Invalid URI encoding; using HTTP default");
+ CatalinaLogger.CONNECTOR_LOGGER.invalidEncodingUseHttpDefault(e);
connector.setURIEncoding(null);
}
if (conv != null) {
@@ -759,7 +749,7 @@
cc.getLength());
return;
} catch (IOException e) {
- log.error("Invalid URI character encoding; trying ascii");
+ CatalinaLogger.CONNECTOR_LOGGER.invalidEncoding(e);
cc.recycle();
}
}
Modified: trunk/src/main/java/org/apache/catalina/connector/HttpEventImpl.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/connector/HttpEventImpl.java 2012-08-29 08:36:47 UTC (rev 2073)
+++ trunk/src/main/java/org/apache/catalina/connector/HttpEventImpl.java 2012-08-29 16:44:25 UTC (rev 2074)
@@ -23,18 +23,10 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.catalina.util.StringManager;
import org.jboss.servlet.http.HttpEvent;
public class HttpEventImpl implements HttpEvent {
- /**
- * The string manager for this package.
- */
- protected static StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
public HttpEventImpl(Request request, Response response) {
this.request = request;
this.response = response;
Modified: trunk/src/main/java/org/apache/catalina/connector/InputBuffer.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/connector/InputBuffer.java 2012-08-29 08:36:47 UTC (rev 2073)
+++ trunk/src/main/java/org/apache/catalina/connector/InputBuffer.java 2012-08-29 16:44:25 UTC (rev 2074)
@@ -17,6 +17,8 @@
package org.apache.catalina.connector;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.IOException;
import java.io.Reader;
import java.security.AccessController;
@@ -26,7 +28,6 @@
import java.util.Locale;
import org.apache.catalina.security.SecurityUtil;
-import org.apache.catalina.util.StringManager;
import org.apache.coyote.ActionCode;
import org.apache.coyote.Request;
import org.apache.tomcat.util.buf.B2CConverter;
@@ -49,13 +50,6 @@
// -------------------------------------------------------------- Constants
- /**
- * The string manager for this package.
- */
- protected static StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
public static final String DEFAULT_ENCODING =
org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING;
public static final int DEFAULT_BUFFER_SIZE = 8*1024;
@@ -364,7 +358,7 @@
throws IOException {
if (closed)
- throw new IOException(sm.getString("inputBuffer.streamClosed"));
+ throw MESSAGES.streamClosed();
return bb.substract();
}
@@ -374,7 +368,7 @@
throws IOException {
if (closed)
- throw new IOException(sm.getString("inputBuffer.streamClosed"));
+ throw MESSAGES.streamClosed();
return bb.substract(b, off, len);
}
@@ -426,7 +420,7 @@
throws IOException {
if (closed)
- throw new IOException(sm.getString("inputBuffer.streamClosed"));
+ throw MESSAGES.streamClosed();
return cb.substract();
}
@@ -442,7 +436,7 @@
throws IOException {
if (closed)
- throw new IOException(sm.getString("inputBuffer.streamClosed"));
+ throw MESSAGES.streamClosed();
return cb.substract(cbuf, off, len);
}
@@ -452,7 +446,7 @@
throws IOException {
if (closed)
- throw new IOException(sm.getString("inputBuffer.streamClosed"));
+ throw MESSAGES.streamClosed();
if (n < 0) {
throw new IllegalArgumentException();
@@ -487,7 +481,7 @@
throws IOException {
if (closed)
- throw new IOException(sm.getString("inputBuffer.streamClosed"));
+ throw MESSAGES.streamClosed();
return (available() > 0);
}
@@ -502,7 +496,7 @@
throws IOException {
if (closed)
- throw new IOException(sm.getString("inputBuffer.streamClosed"));
+ throw MESSAGES.streamClosed();
if (cb.getLength() <= 0) {
cb.setOffset(0);
@@ -527,7 +521,7 @@
throws IOException {
if (closed)
- throw new IOException(sm.getString("inputBuffer.streamClosed"));
+ throw MESSAGES.streamClosed();
if (state == CHAR_STATE) {
if (markPos < 0) {
Deleted: trunk/src/main/java/org/apache/catalina/connector/LocalStrings.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/connector/LocalStrings.properties 2012-08-29 08:36:47 UTC (rev 2073)
+++ trunk/src/main/java/org/apache/catalina/connector/LocalStrings.properties 2012-08-29 16:44:25 UTC (rev 2074)
@@ -1,89 +0,0 @@
-
-#
-# CoyoteConnector
-#
-
-coyoteConnector.alreadyInitialized=The connector has already been initialized
-coyoteConnector.alreadyStarted=The connector has already been started
-coyoteConnector.cannotRegisterProtocol=Cannot register MBean for the Protocol
-coyoteConnector.notStarted=Coyote connector has not been started
-coyoteConnector.protocolHandlerDestroyFailed=Protocol handler destroy failed: {0}
-coyoteConnector.protocolHandlerInitializationFailed=Protocol handler initialization failed: {0}
-coyoteConnector.protocolHandlerInstantiationFailed=Protocol handler instantiation failed: {0}
-coyoteConnector.protocolHandlerStartFailed=Protocol handler start failed: {0}
-coyoteConnector.protocolRegistrationFailed=Protocol JMX registration failed
-coyoteConnector.protocolHandlerPauseFailed=Protocol handler pause failed
-coyoteConnector.protocolHandlerResumeFailed=Protocol handler resume failed
-coyoteConnector.MapperRegistration=register Mapper: {0}
-coyoteConnector.protocolUnregistrationFailed=Protocol handler stop failed
-
-
-#
-# CoyoteAdapter
-#
-
-coyoteAdapter.service=An exception or error occurred in the container during the request processing
-coyoteAdapter.read=The servlet did not read all available bytes during the processing of the read event
-coyoteAdapter.complete=The AsyncLisnener {0} onComplete threw an exception, which will be ignored
-
-#
-# CoyoteResponse
-#
-
-coyoteResponse.getOutputStream.ise=getWriter() has already been called for this response
-coyoteResponse.getWriter.ise=getOutputStream() has already been called for this response
-coyoteResponse.resetBuffer.ise=Cannot reset buffer after response has been committed
-coyoteResponse.sendError.ise=Cannot call sendError() after the response has been committed
-coyoteResponse.sendRedirect.ise=Cannot call sendRedirect() after the response has been committed
-coyoteResponse.setBufferSize.ise=Cannot change buffer size after data has been written
-coyoteResponse.sendFile.ise=Cannot call sendFile() after the response has been committed
-coyoteResponse.sendFile.no=Sendfile is disabled
-coyoteResponse.sendFile.path=Invalid path
-coyoteResponse.upgrade.ise=Cannot call sendUpgrade() after the response has been committed
-coyoteResponse.upgrade.noEvents=Cannot upgrade from HTTP/1.1 without IO events
-coyoteResponse.upgrade.noHttpEventServlet=Cannot upgrade from HTTP/1.1 is not using an HttpEventServlet
-
-#
-# CoyoteRequest
-#
-
-coyoteRequest.getInputStream.ise=getReader() has already been called for this request
-coyoteRequest.getReader.ise=getInputStream() has already been called for this request
-coyoteRequest.sessionCreateCommitted=Cannot create a session after the response has been committed
-coyoteRequest.setAttribute.namenull=Cannot call setAttribute with a null name
-coyoteRequest.listenerStart=Exception sending context initialized event to listener instance of class {0}
-coyoteRequest.listenerStop=Exception sending context destroyed event to listener instance of class {0}
-coyoteRequest.attributeEvent=Exception thrown by attributes event listener
-coyoteRequest.parseMultipart=Exception thrown whilst processing multipart
-coyoteRequest.notMultipart=The request is not multipart content
-coyoteRequest.parseParameters=Exception thrown whilst processing POSTed parameters
-coyoteRequest.postTooLarge=Parameters were not parsed because the size of the posted data was too big. Use the maxPostSize attribute of the connector to resolve this if the application should accept large POSTs.
-coyoteRequest.noAuthenticator=No authenticator available for programmatic login
-coyoteRequest.authFailed=Failed to authenticate a principal
-coyoteRequest.noAsync=The servlet or filters that are being used by this request do not support async operation
-coyoteRequest.servletStack=Current Servlet stack for thread {0}
-coyoteRequest.closed=Response has been closed already
-coyoteRequest.logoutfail=Exception logging out user
-coyoteRequest.cannotStartAsync=Cannot start async
-coyoteRequest.onStartAsyncError=Error invoking onStartAsync on listener of class {0}
-coyoteRequest.dispatchNoServletContext=Could not determine or access context for server absolute path [{0}]
-coyoteRequest.createListener=Failed to instantiate class {0}
-
-#
-# MapperListener
-#
-mapperListener.unknownDefaultHost=Unknown default host: {0}
-mapperListener.registerHost=Register host {0} at domain {1}
-mapperListener.unregisterHost=Unregister host {0} at domain {1}
-mapperListener.registerContext=Register Context {0}
-mapperListener.unregisterContext=Unregister Context {0}
-mapperListener.registerWrapper=Register Wrapper {0} in Context {1}
-
-#
-# Others
-#
-
-requestFacade.nullRequest=The request object has been recycled and is no longer associated with this facade
-responseFacade.nullResponse=The response object has been recycled and is no longer associated with this facade
-cometEvent.nullRequest=The event object has been recycled and is no longer associated with a request
-inputBuffer.streamClosed=Stream closed
Deleted: trunk/src/main/java/org/apache/catalina/connector/LocalStrings_es.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/connector/LocalStrings_es.properties 2012-08-29 08:36:47 UTC (rev 2073)
+++ trunk/src/main/java/org/apache/catalina/connector/LocalStrings_es.properties 2012-08-29 16:44:25 UTC (rev 2074)
@@ -1,64 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-# CoyoteConnector
-coyoteConnector.alreadyInitialized = Ya ha sido inicializado el conector
-coyoteConnector.alreadyStarted = Ya ha sido arrancado el conector
-coyoteConnector.cannotRegisterProtocol = No puedo registrar MBean para el Protocolo
-coyoteConnector.notStarted = El conector Coyote no ha sido arrancado
-coyoteConnector.protocolHandlerDestroyFailed = Fall\u00F3 la destrucci\u00F3n del manejador de protocolo\: {0}
-coyoteConnector.protocolHandlerInitializationFailed = Fall\u00F3 la inicializaci\u00F3n del manejador de protocolo\: {0}
-coyoteConnector.protocolHandlerInstantiationFailed = Fall\u00F3 la instanciaci\u00F3n del manejador de protocolo\: {0}
-coyoteConnector.protocolHandlerStartFailed = Fall\u00F3 el arranque del manejador de protocolo\: {0}
-coyoteConnector.protocolRegistrationFailed = Fall\u00F3 el registro de JMX
-coyoteConnector.protocolHandlerPauseFailed = Ha fallado la pausa del manejador de protocolo
-coyoteConnector.protocolHandlerResumeFailed = Ha fallado el rearranque del manejador de protocolo
-coyoteConnector.MapperRegistration = Mapeador de registro\: {0}
-coyoteConnector.protocolUnregistrationFailed = Ha fallado la parada del manejador de protocolo
-#
-# CoyoteAdapter
-coyoteAdapter.service = Ha tenido lugar una excepci\u00F3n o error en el contenedor durante el procesamiento del requerimiento
-coyoteAdapter.read = El servlet no ley\u00F3 todos los bytes disponibles durante el procesamiento del evento de lectura
-#
-# CoyoteResponse
-coyoteResponse.getOutputStream.ise = getWriter() ya ha sido llamado para esta respuesta
-coyoteResponse.getWriter.ise = getOutputStream() ya ha sido llamado para esta respuesta
-coyoteResponse.resetBuffer.ise = No puedo limpiar el b\u00FAfer despu\u00E9s de que la repuesta ha sido llevada a cabo
-coyoteResponse.sendError.ise = No puedo llamar a sendError() tras llevar a cabo la respuesta
-coyoteResponse.sendRedirect.ise = No puedo llamar a sendRedirect() tras llevar a cabo la respuesta
-coyoteResponse.setBufferSize.ise = No puedo cambiar la medida del b\u00FAfer tras escribir los datos
-#
-# CoyoteRequest
-coyoteRequest.getInputStream.ise = getReader() ya ha sido llamado para este requerimiento
-coyoteRequest.getReader.ise = getInputStream() ya ha sido llamado para este requerimiento
-coyoteRequest.sessionCreateCommitted = No puedo crear una sesi\u00F3n despu\u00E9s de llevar a cabo la respueta
-coyoteRequest.setAttribute.namenull = No pudeo llamar a setAttribute con un nombre nulo
-coyoteRequest.listenerStart = Excepci\u00F3n enviando evento inicializado de contexto a instancia de escuchador de clase {0}
-coyoteRequest.listenerStop = Excepci\u00F3n enviando evento destru\u00EDdo de contexto a instancia de escuchador de clase {0}
-coyoteRequest.attributeEvent = Excepci\u00F3n lanzada mediante el escuchador de eventos de atributos
-coyoteRequest.parseParameters = Excepci\u00F3n lanzada al procesar par\u00E1metros POST
-coyoteRequest.postTooLarge = No se analizaron los par\u00E1metros porque la medida de los datos enviados era demasiado grande. Usa el atributo maxPostSize del conector para resolver esto en caso de que la aplicaci\u00F3n debiera de aceptar POSTs m\u00E1s grandes.
-requestFacade.nullRequest = El objeto de requerimiento ha sido reciclado y ya no est\u00E1 asociado con esta fachada
-responseFacade.nullResponse = El objeto de respuesta ha sido reciclado y ya no est\u00E1 asociado con esta fachada
-cometEvent.nullRequest = El objeto de evento ha sido reciclado y ya no est\u00E1 asociado con este requerimiento
-mapperListener.unknownDefaultHost = M\u00E1quina por defecto desconocida\: {0}
-mapperListener.registerHost = Registrar m\u00E1quina {0} en dominio {1}
-mapperListener.unregisterHost = Desregistrar m\u00E1quina {0} en dominio {1}
-#
-# MapperListener
-mapperListener.registerContext = Registrar Contexto {0}
-mapperListener.unregisterContext = Desregistrar Contexto {0}
-mapperListener.registerWrapper = Registrar Arropador (Wrapper) {0} en Contexto {1}
-inputBuffer.streamClosed = Flujo cerrado
Deleted: trunk/src/main/java/org/apache/catalina/connector/LocalStrings_fr.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/connector/LocalStrings_fr.properties 2012-08-29 08:36:47 UTC (rev 2073)
+++ trunk/src/main/java/org/apache/catalina/connector/LocalStrings_fr.properties 2012-08-29 16:44:25 UTC (rev 2074)
@@ -1,58 +0,0 @@
-
-#
-# CoyoteConnector
-#
-
-coyoteConnector.alreadyInitialized=Le connecteur a d�j� �t� initialis�
-coyoteConnector.alreadyStarted=Le connecteur a d�j� �t� d�marr�
-coyoteConnector.cannotRegisterProtocol=Impossible d''enregistrer le MBean pour le Protocol
-coyoteConnector.notStarted=Le connecteur Coyote n''a pas �t� d�marr�
-coyoteConnector.protocolHandlerDestroyFailed=La destruction du gestionnaire de protocole a �chou�e: {0}
-coyoteConnector.protocolHandlerInitializationFailed=L''initialisation du gestionnaire de protocole a �chou�: {0}
-coyoteConnector.protocolHandlerInstantiationFailed=L''instantiation du gestionnaire de protocole a �chou�: {0}
-coyoteConnector.protocolHandlerStartFailed=Le d�marrage du gestionnaire de protocole a �chou�: {0}
-coyoteConnector.protocolRegistrationFailed=L''enregistrement du protocol JMX a �chou�
-coyoteConnector.protocolHandlerPauseFailed=La suspension du gestionnaire de protocole a �chou�e
-coyoteConnector.protocolHandlerResumeFailed=Le red�marrage du gestionnaire de protocole a �chou�
-
-#
-# CoyoteAdapter
-#
-
-coyoteAdapter.service=Une exception ou une erreur s''est produite dans le conteneur durant le traitement de la requ�te
-
-#
-# CoyoteResponse
-#
-
-coyoteResponse.getOutputStream.ise="getWriter()" a d�j� �t� appel� pour cette r�ponse
-coyoteResponse.getWriter.ise="getOutputStream()" a d�j� �t� appel� pour cette r�ponse
-coyoteResponse.resetBuffer.ise=Impossible de remettre � z�ro le tampon apr�s que la r�ponse ait �t� envoy�e
-coyoteResponse.sendError.ise=Impossible d''appeler "sendError()" apr�s que la r�ponse ait �t� envoy�e
-coyoteResponse.sendRedirect.ise=Impossible d''appeler "sendRedirect()" apr�s que la r�ponse ait �t� envoy�e
-coyoteResponse.setBufferSize.ise=Impossible de changer la taille du tampon apr�s que les donn�es aient �t� �crites
-
-#
-# CoyoteRequest
-#
-
-coyoteRequest.getInputStream.ise="getReader()" a d�j� �t� appel� pour cette requ�te
-coyoteRequest.getReader.ise="getInputStream()" a d�j� �t� appel� pour cette requ�te
-coyoteRequest.sessionCreateCommitted=Impossible de cr�er une sessionapr�s que la r�ponse ait �t� envoy�e
-coyoteRequest.setAttribute.namenull=Impossible d''appeler "setAttribute" avec un nom nul
-coyoteRequest.listenerStart=Une exception s''est produite lors de l''envoi de l''�v�nement contexte initialis� � l''instance de classe d''�coute {0}
-coyoteRequest.listenerStop=Une exception s''est produite lors de l''envoi de l''�v�nement contexte d�truit � l''instance de classe d''�coute {0}
-coyoteRequest.attributeEvent=Une exception a �t� lanc�e par l''instance d''�coute pour l''�v�nement attributs (attributes)
-coyoteRequest.postTooLarge=Les param�tres n''ont pas �t� �valu� car la taille des donn�es post�es est trop important. Utilisez l''attribut maxPostSize du connecteur pour corriger ce probl�me si votre application doit accepter des POSTs importants.
-
-
-#
-# MapperListener
-#
-
-mapperListener.registerContext=Enregistrement du contexte {0}
-mapperListener.unregisterContext=D�senregistrement du contexte {0}
-mapperListener.registerWrapper=Enregistrement de l''enrobeur (wrapper) {0} dans le contexte {1}
-
-
-
Deleted: trunk/src/main/java/org/apache/catalina/connector/LocalStrings_ja.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/connector/LocalStrings_ja.properties 2012-08-29 08:36:47 UTC (rev 2073)
+++ trunk/src/main/java/org/apache/catalina/connector/LocalStrings_ja.properties 2012-08-29 16:44:25 UTC (rev 2074)
@@ -1,58 +0,0 @@
-
-#
-# CoyoteConnector
-#
-
-coyoteConnector.alreadyInitialized=\u30b3\u30cd\u30af\u30bf\u306f\u65e2\u306b\u521d\u671f\u5316\u3055\u308c\u3066\u3044\u307e\u3059
-coyoteConnector.alreadyStarted=\u30b3\u30cd\u30af\u30bf\u306f\u65e2\u306b\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u3059
-coyoteConnector.cannotRegisterProtocol=\u305d\u306e\u30d7\u30ed\u30c8\u30b3\u30eb\u306bMBean\u3092\u767b\u9332\u3067\u304d\u307e\u305b\u3093
-coyoteConnector.notStarted=Coyote\u30b3\u30cd\u30af\u30bf\u306f\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-coyoteConnector.protocolHandlerDestroyFailed=\u30d7\u30ed\u30c8\u30b3\u30eb\u30cf\u30f3\u30c9\u30e9\u306e\u5ec3\u68c4\u306b\u5931\u6557\u3057\u307e\u3057\u305f: {0}
-coyoteConnector.protocolHandlerInitializationFailed=\u30d7\u30ed\u30c8\u30b3\u30eb\u30cf\u30f3\u30c9\u30e9\u306e\u521d\u671f\u5316\u306b\u5931\u6557\u3057\u307e\u3057\u305f: {0}
-coyoteConnector.protocolHandlerInstantiationFailed=\u30d7\u30ed\u30c8\u30b3\u30eb\u30cf\u30f3\u30c9\u30e9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u306b\u5931\u6557\u3057\u307e\u3057\u305f: {0}
-coyoteConnector.protocolHandlerStartFailed=\u30d7\u30ed\u30c8\u30b3\u30eb\u30cf\u30f3\u30c9\u30e9\u306e\u8d77\u52d5\u306b\u5931\u6557\u3057\u307e\u3057\u305f: {0}
-coyoteConnector.protocolRegistrationFailed=\u30d7\u30ed\u30c8\u30b3\u30ebJMX\u306e\u767b\u9332\u306b\u5931\u6557\u3057\u307e\u3057\u305f
-coyoteConnector.protocolHandlerPauseFailed=\u30d7\u30ed\u30c8\u30b3\u30eb\u30cf\u30f3\u30c9\u30e9\u306e\u4e00\u6642\u505c\u6b62\u306b\u5931\u6557\u3057\u307e\u3057\u305f
-coyoteConnector.protocolHandlerResumeFailed=\u30d7\u30ed\u30c8\u30b3\u30eb\u30cf\u30f3\u30c9\u30e9\u306e\u518d\u958b\u306b\u5931\u6557\u3057\u307e\u3057\u305f
-
-#
-# CoyoteAdapter
-#
-
-coyoteAdapter.service=\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u51e6\u7406\u4e2d\u306b\u30b3\u30cd\u30af\u30bf\u3067\u4f8b\u5916\u307e\u305f\u306f\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
-
-#
-# CoyoteResponse
-#
-
-coyoteResponse.getOutputStream.ise=getWriter()\u306f\u3053\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u306b\u5bfe\u3057\u3066\u65e2\u306b\u547c\u3073\u51fa\u3055\u308c\u3066\u3044\u307e\u3059
-coyoteResponse.getWriter.ise=getOutputStream()\u306f\u3053\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u306b\u5bfe\u3057\u3066\u65e2\u306b\u547c\u3073\u51fa\u3055\u308c\u3066\u3044\u307e\u3059
-coyoteResponse.resetBuffer.ise=\u30ec\u30b9\u30dd\u30f3\u30b9\u304c\u30b3\u30df\u30c3\u30c8\u3055\u308c\u305f\u5f8c\u3067\u30d0\u30c3\u30d5\u30a1\u3092\u30ea\u30bb\u30c3\u30c8\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093
-coyoteResponse.sendError.ise=\u30ec\u30b9\u30dd\u30f3\u30b9\u304c\u30b3\u30df\u30c3\u30c8\u3055\u308c\u305f\u5f8c\u3067sendError()\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093
-coyoteResponse.sendRedirect.ise=\u30ec\u30b9\u30dd\u30f3\u30b9\u304c\u30b3\u30df\u30c3\u30c8\u3055\u308c\u305f\u5f8c\u3067sendRedirect()\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093
-coyoteResponse.setBufferSize.ise=\u30c7\u30fc\u30bf\u304c\u65e2\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305f\u5f8c\u3067\u30d0\u30c3\u30d5\u30a1\u30b5\u30a4\u30ba\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093
-
-#
-# CoyoteRequest
-#
-
-coyoteRequest.getInputStream.ise=getReader()\u306f\u3053\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u5bfe\u3057\u3066\u65e2\u306b\u547c\u3073\u51fa\u3055\u308c\u3066\u3044\u307e\u3059
-coyoteRequest.getReader.ise=getInputStream()\u306f\u3053\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u5bfe\u3057\u3066\u65e2\u306b\u547c\u3073\u51fa\u3055\u308c\u3066\u3044\u307e\u3059
-coyoteRequest.sessionCreateCommitted=\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u30b3\u30df\u30c3\u30c8\u3057\u305f\u5f8c\u3067\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093
-coyoteRequest.setAttribute.namenull=setAttribute\u3092\u540d\u524d\u3092\u6307\u5b9a\u305b\u305a\u306b\u547c\u3073\u51fa\u3059\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093
-coyoteRequest.listenerStart=\u30af\u30e9\u30b9 {0} \u306e\u30ea\u30b9\u30ca\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u521d\u671f\u5316\u30a4\u30d9\u30f3\u30c8\u3092\u9001\u4fe1\u4e2d\u306b\u4f8b\u5916\u304c\u6295\u3052\u3089\u308c\u307e\u3057\u305f
-coyoteRequest.listenerStop=\u30af\u30e9\u30b9 {0} \u306e\u30ea\u30b9\u30ca\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u5ec3\u68c4\u30a4\u30d9\u30f3\u30c8\u3092\u9001\u4fe1\u4e2d\u306b\u4f8b\u5916\u304c\u6295\u3052\u3089\u308c\u307e\u3057\u305f
-coyoteRequest.attributeEvent=\u5c5e\u6027\u30a4\u30d9\u30f3\u30c8\u30ea\u30b9\u30ca\u306b\u3088\u3063\u3066\u4f8b\u5916\u304c\u6295\u3052\u3089\u308c\u307e\u3057\u305f
-coyoteRequest.postTooLarge=POST\u3055\u308c\u305f\u30c7\u30fc\u30bf\u304c\u5927\u304d\u3059\u304e\u305f\u306e\u3067\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u69cb\u6587\u89e3\u6790\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u305d\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u5de8\u5927\u306aPOST\u3092\u53d7\u3051\u4ed8\u3051\u306d\u3070\u306a\u3089\u306a\u3044\u5834\u5408\u306b\u306f\u3001\u3053\u308c\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u30b3\u30cd\u30af\u30bf\u306emaxPostSize\u5c5e\u6027\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002
-
-
-#
-# MapperListener
-#
-
-mapperListener.registerContext=\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8 {0}\u3000\u3092\u767b\u9332\u3057\u307e\u3059
-mapperListener.unregisterContext=\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8 {0} \u306e\u767b\u9332\u3092\u62b9\u6d88\u3057\u307e\u3059
-mapperListener.registerWrapper=\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8 {1} \u306b\u30e9\u30c3\u30d1 {0} \u3092\u767b\u9332\u3057\u307e\u3059
-
-
-
Modified: trunk/src/main/java/org/apache/catalina/connector/Request.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/connector/Request.java 2012-08-29 08:36:47 UTC (rev 2073)
+++ trunk/src/main/java/org/apache/catalina/connector/Request.java 2012-08-29 16:44:25 UTC (rev 2074)
@@ -47,6 +47,8 @@
package org.apache.catalina.connector;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
@@ -106,7 +108,6 @@
import org.apache.catalina.realm.GenericPrincipal;
import org.apache.catalina.util.Enumerator;
import org.apache.catalina.util.ParameterMap;
-import org.apache.catalina.util.StringManager;
import org.apache.catalina.util.StringParser;
import org.apache.coyote.ActionCode;
import org.apache.tomcat.util.buf.B2CConverter;
@@ -125,6 +126,7 @@
import org.apache.tomcat.util.http.fileupload.disk.DiskFileItemFactory;
import org.apache.tomcat.util.http.fileupload.servlet.ServletFileUpload;
import org.apache.tomcat.util.http.mapper.MappingData;
+import org.jboss.web.CatalinaLogger;
/**
@@ -217,13 +219,6 @@
/**
- * The string manager for this package.
- */
- protected static StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- /**
* The set of cookies associated with this Request.
*/
protected Cookie[] cookies = null;
@@ -1218,8 +1213,7 @@
public ServletInputStream getInputStream() throws IOException {
if (usingReader)
- throw new IllegalStateException
- (sm.getString("coyoteRequest.getInputStream.ise"));
+ throw MESSAGES.readerAlreadyUsed();
if (applicationInputStream != null) {
return applicationInputStream;
@@ -1373,8 +1367,7 @@
public BufferedReader getReader() throws IOException {
if (usingInputStream)
- throw new IllegalStateException
- (sm.getString("coyoteRequest.getReader.ise"));
+ throw MESSAGES.inputStreamAlreadyUsed();
if (applicationReader != null) {
return applicationReader;
@@ -1631,7 +1624,7 @@
try {
listener.attributeRemoved(event);
} catch (Throwable t) {
- context.getLogger().error(sm.getString("coyoteRequest.attributeEvent"), t);
+ context.getLogger().error(MESSAGES.attributesEventListenerException(), t);
// Error valve will pick this execption up and display it to user
attributes.put(RequestDispatcher.ERROR_EXCEPTION, t);
}
@@ -1649,8 +1642,7 @@
// Name cannot be null
if (name == null)
- throw new IllegalArgumentException
- (sm.getString("coyoteRequest.setAttribute.namenull"));
+ throw MESSAGES.attributeNameNotSpecified();
// Null value is the same as removeAttribute()
if (value == null) {
@@ -1715,7 +1707,7 @@
listener.attributeAdded(event);
}
} catch (Throwable t) {
- context.getLogger().error(sm.getString("coyoteRequest.attributeEvent"), t);
+ context.getLogger().error(MESSAGES.attributesEventListenerException(), t);
// Error valve will pick this execption up and display it to user
attributes.put(RequestDispatcher.ERROR_EXCEPTION, t);
}
@@ -2633,8 +2625,7 @@
if ((response != null) &&
context.getCookies() &&
response.getResponse().isCommitted()) {
- throw new IllegalStateException
- (sm.getString("coyoteRequest.sessionCreateCommitted"));
+ throw MESSAGES.cannotCreateSession();
}
// Verify that the submitted session id exists in one of the host's web applications
@@ -2831,10 +2822,7 @@
try {
parseMultipart();
} catch (Exception e) {
- if (context.getLogger().isDebugEnabled()) {
- context.getLogger().debug(
- sm.getString("coyoteRequest.parseMultipart"), e);
- }
+ CatalinaLogger.CONNECTOR_LOGGER.exceptionProcessingMultipart(e);
}
}
return;
@@ -2845,10 +2833,7 @@
if (len > 0) {
int maxPostSize = connector.getMaxPostSize();
if ((maxPostSize > 0) && (len > maxPostSize)) {
- if (context.getLogger().isDebugEnabled()) {
- context.getLogger().debug(
- sm.getString("coyoteRequest.postTooLarge"));
- }
+ CatalinaLogger.CONNECTOR_LOGGER.postDataTooLarge();
return;
}
byte[] formData = null;
@@ -2865,10 +2850,7 @@
}
} catch (IOException e) {
// Client disconnect
- if (context.getLogger().isDebugEnabled()) {
- context.getLogger().debug(
- sm.getString("coyoteRequest.parseParameters"), e);
- }
+ CatalinaLogger.CONNECTOR_LOGGER.exceptionProcessingParameters(e);
return;
}
parameters.processParameters(formData, 0, len);
@@ -2879,10 +2861,7 @@
formData = readChunkedPostBody();
} catch (IOException e) {
// Client disconnect
- if (context.getLogger().isDebugEnabled()) {
- context.getLogger().debug(
- sm.getString("coyoteRequest.parseParameters"), e);
- }
+ CatalinaLogger.CONNECTOR_LOGGER.exceptionProcessingParameters(e);
return;
}
if (formData != null) {
@@ -2907,8 +2886,7 @@
if (connector.getMaxPostSize() > 0 &&
(body.getLength() + len) > connector.getMaxPostSize()) {
// Too much data
- throw new IllegalArgumentException(
- sm.getString("coyoteRequest.postTooLarge"));
+ throw MESSAGES.postDataTooLarge();
}
if (len > 0) {
body.append(buffer, 0, len);
@@ -2960,7 +2938,7 @@
contentType = contentType.trim();
}
if (!("multipart/form-data".equals(contentType)))
- throw new ServletException(sm.getString("coyoteRequest.notMultipart"));
+ throw new ServletException(MESSAGES.notMultipart());
File location = null;
if (config.getLocation() == null || config.getLocation().length() == 0) {
@@ -2995,11 +2973,11 @@
parts.put(fileItem.getFieldName(), new StandardPart(fileItem, config));
}
} catch(FileSizeLimitExceededException e) {
- throw new IllegalStateException(sm.getString("coyoteRequest.parseMultipart"), e);
+ throw MESSAGES.multipartProcessingFailed(e);
} catch(SizeLimitExceededException e) {
- throw new IllegalStateException(sm.getString("coyoteRequest.parseMultipart"), e);
+ throw MESSAGES.multipartProcessingFailed(e);
} catch (FileUploadException e) {
- throw new IOException(sm.getString("coyoteRequest.parseMultipart"), e);
+ throw MESSAGES.multipartIoProcessingFailed(e);
}
}
@@ -3200,17 +3178,17 @@
public AsyncContext startAsync(ServletRequest servletRequest,
ServletResponse servletResponse) throws IllegalStateException {
if (CHECK_ASYNC && !isAsyncSupported()) {
- throw new IllegalStateException(sm.getString("coyoteRequest.noAsync"));
+ throw MESSAGES.noAsync();
}
// ISE if response is closed
if (response.isClosed() || context == null) {
- throw new IllegalStateException(sm.getString("coyoteRequest.closed"));
+ throw MESSAGES.asyncClose();
}
// ISE if this method is called again without any asynchronous dispatch
// ISE if called outside of the subsequent dispatch
// ISE if called again within the scope of the same dispatch
if (!canStartAsync) {
- throw new IllegalStateException(sm.getString("coyoteRequest.cannotStartAsync"));
+ throw MESSAGES.cannotStartAsync();
}
LinkedHashMap<AsyncListener, AsyncListenerRegistration> localAsyncListeners = asyncListeners;
asyncListeners = new LinkedHashMap<AsyncListener, AsyncListenerRegistration>();
@@ -3220,8 +3198,7 @@
try {
asyncListener.onStartAsync(asyncEvent);
} catch (IOException e) {
- throw new IllegalStateException(sm.getString("coyoteRequest.onStartAsyncError",
- asyncListener.getClass().getName()), e);
+ throw MESSAGES.errorStartingAsync(asyncListener.getClass().getName(), e);
}
}
canStartAsync = false;
@@ -3240,21 +3217,21 @@
if (context != null && context.getAuthenticator() != null) {
return context.getAuthenticator().authenticate(this, response);
} else {
- throw new ServletException(sm.getString("coyoteRequest.noAuthenticator"));
+ throw new ServletException(MESSAGES.noAuthenticator());
}
}
public void login(String username, String password) throws ServletException {
if (userPrincipal != null) {
- throw new ServletException(sm.getString("coyoteRequest.authFailed"));
+ throw new ServletException(MESSAGES.authenticationFailure());
}
if (context != null && context.getAuthenticator() != null) {
context.getAuthenticator().login(this, username, password);
} else {
- throw new ServletException(sm.getString("coyoteRequest.noAuthenticator"));
+ throw new ServletException(MESSAGES.noAuthenticator());
}
if (userPrincipal == null) {
- throw new ServletException(sm.getString("coyoteRequest.authFailed"));
+ throw new ServletException(MESSAGES.authenticationFailure());
}
}
@@ -3271,7 +3248,7 @@
try {
gp.logout();
} catch (Exception e) {
- throw new ServletException(sm.getString("coyoteRequest.logoutfail"), e);
+ throw new ServletException(MESSAGES.logoutFailure(), e);
}
}
}
@@ -3318,7 +3295,7 @@
public String toString() {
StringBuilder buf = new StringBuilder();
- buf.append(sm.getString("coyoteRequest.servletStack", Thread.currentThread().getName()));
+ buf.append("Current Servlet stack for thread ").append(Thread.currentThread().getName());
if (eventMode) {
buf.append(" [event]");
}
@@ -3390,7 +3367,7 @@
if (servletContext != null) {
path = requestURI.substring(servletContext.getContextPath().length());
} else {
- throw new IllegalStateException(sm.getString("coyoteRequest.dispatchNoServletContext", requestURI));
+ throw MESSAGES.cannotFindDispatchContext(requestURI);
}
}
resume();
@@ -3506,7 +3483,7 @@
try {
listenerInstance = (T) context.getInstanceManager().newInstance(clazz);
} catch (Exception e) {
- throw new ServletException(sm.getString("coyoteRequest.createListener", clazz.getName()), e);
+ throw new ServletException(MESSAGES.listenerCreationFailed(clazz.getName()), e);
}
return listenerInstance;
}
Modified: trunk/src/main/java/org/apache/catalina/connector/RequestFacade.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/connector/RequestFacade.java 2012-08-29 08:36:47 UTC (rev 2073)
+++ trunk/src/main/java/org/apache/catalina/connector/RequestFacade.java 2012-08-29 16:44:25 UTC (rev 2074)
@@ -18,6 +18,8 @@
package org.apache.catalina.connector;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.BufferedReader;
import java.io.IOException;
import java.security.AccessController;
@@ -44,7 +46,6 @@
import org.apache.catalina.Globals;
import org.apache.catalina.core.ApplicationFilterChain;
import org.apache.catalina.security.SecurityUtil;
-import org.apache.catalina.util.StringManager;
/**
* Facade class that wraps a Coyote request object.
@@ -231,13 +232,6 @@
protected Request request = null;
- /**
- * The string manager for this package.
- */
- protected static StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
// --------------------------------------------------------- Public Methods
@@ -264,8 +258,7 @@
public Object getAttribute(String name) {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getAttribute(name);
@@ -275,8 +268,7 @@
public Enumeration getAttributeNames() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
if (Globals.IS_SECURITY_ENABLED){
@@ -291,8 +283,7 @@
public String getCharacterEncoding() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
if (Globals.IS_SECURITY_ENABLED){
@@ -308,8 +299,7 @@
throws java.io.UnsupportedEncodingException {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
request.setCharacterEncoding(env);
@@ -319,8 +309,7 @@
public int getContentLength() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getContentLength();
@@ -330,8 +319,7 @@
public String getContentType() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getContentType();
@@ -341,8 +329,7 @@
public ServletInputStream getInputStream() throws IOException {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getInputStream();
@@ -352,8 +339,7 @@
public String getParameter(String name) {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
if (Globals.IS_SECURITY_ENABLED){
@@ -368,8 +354,7 @@
public Enumeration getParameterNames() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
if (Globals.IS_SECURITY_ENABLED){
@@ -384,8 +369,7 @@
public String[] getParameterValues(String name) {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
String[] ret = null;
@@ -411,8 +395,7 @@
public Map getParameterMap() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
if (Globals.IS_SECURITY_ENABLED){
@@ -427,8 +410,7 @@
public String getProtocol() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getProtocol();
@@ -438,8 +420,7 @@
public String getScheme() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getScheme();
@@ -449,8 +430,7 @@
public String getServerName() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getServerName();
@@ -460,8 +440,7 @@
public int getServerPort() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getServerPort();
@@ -471,8 +450,7 @@
public BufferedReader getReader() throws IOException {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getReader();
@@ -482,8 +460,7 @@
public String getRemoteAddr() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getRemoteAddr();
@@ -493,8 +470,7 @@
public String getRemoteHost() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getRemoteHost();
@@ -504,8 +480,7 @@
public void setAttribute(String name, Object o) {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
request.setAttribute(name, o);
@@ -515,8 +490,7 @@
public void removeAttribute(String name) {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
request.removeAttribute(name);
@@ -526,8 +500,7 @@
public Locale getLocale() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
if (Globals.IS_SECURITY_ENABLED){
@@ -542,8 +515,7 @@
public Enumeration getLocales() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
if (Globals.IS_SECURITY_ENABLED){
@@ -558,8 +530,7 @@
public boolean isSecure() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.isSecure();
@@ -569,8 +540,7 @@
public RequestDispatcher getRequestDispatcher(String path) {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
if (Globals.IS_SECURITY_ENABLED){
@@ -584,8 +554,7 @@
public String getRealPath(String path) {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getRealPath(path);
@@ -595,8 +564,7 @@
public String getAuthType() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getAuthType();
@@ -606,8 +574,7 @@
public Cookie[] getCookies() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
Cookie[] ret = null;
@@ -633,8 +600,7 @@
public long getDateHeader(String name) {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getDateHeader(name);
@@ -644,8 +610,7 @@
public String getHeader(String name) {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getHeader(name);
@@ -655,8 +620,7 @@
public Enumeration getHeaders(String name) {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
if (Globals.IS_SECURITY_ENABLED){
@@ -671,8 +635,7 @@
public Enumeration getHeaderNames() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
if (Globals.IS_SECURITY_ENABLED){
@@ -687,8 +650,7 @@
public int getIntHeader(String name) {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getIntHeader(name);
@@ -698,8 +660,7 @@
public String getMethod() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getMethod();
@@ -709,8 +670,7 @@
public String getPathInfo() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getPathInfo();
@@ -720,8 +680,7 @@
public String getPathTranslated() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getPathTranslated();
@@ -731,8 +690,7 @@
public String getContextPath() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getContextPath();
@@ -742,8 +700,7 @@
public String getQueryString() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getQueryString();
@@ -753,8 +710,7 @@
public String getRemoteUser() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getRemoteUser();
@@ -764,8 +720,7 @@
public boolean isUserInRole(String role) {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.isUserInRole(role);
@@ -775,8 +730,7 @@
public java.security.Principal getUserPrincipal() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getUserPrincipal();
@@ -786,8 +740,7 @@
public String getRequestedSessionId() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getRequestedSessionId();
@@ -797,8 +750,7 @@
public String getRequestURI() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getRequestURI();
@@ -808,8 +760,7 @@
public StringBuffer getRequestURL() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getRequestURL();
@@ -819,8 +770,7 @@
public String getServletPath() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getServletPath();
@@ -830,8 +780,7 @@
public HttpSession getSession(boolean create) {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
if (SecurityUtil.isPackageProtectionEnabled()){
@@ -845,8 +794,7 @@
public HttpSession getSession() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return getSession(true);
@@ -856,8 +804,7 @@
public boolean isRequestedSessionIdValid() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.isRequestedSessionIdValid();
@@ -867,8 +814,7 @@
public boolean isRequestedSessionIdFromCookie() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.isRequestedSessionIdFromCookie();
@@ -878,8 +824,7 @@
public boolean isRequestedSessionIdFromURL() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.isRequestedSessionIdFromURL();
@@ -889,8 +834,7 @@
public boolean isRequestedSessionIdFromUrl() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.isRequestedSessionIdFromURL();
@@ -900,8 +844,7 @@
public String getLocalAddr() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getLocalAddr();
@@ -911,8 +854,7 @@
public String getLocalName() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getLocalName();
@@ -922,8 +864,7 @@
public int getLocalPort() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getLocalPort();
@@ -933,8 +874,7 @@
public int getRemotePort() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getRemotePort();
@@ -943,8 +883,7 @@
public AsyncContext getAsyncContext() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getAsyncContext();
@@ -953,8 +892,7 @@
public ServletContext getServletContext() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getServletContext();
@@ -963,8 +901,7 @@
public boolean isAsyncStarted() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.isAsyncStarted();
@@ -973,8 +910,7 @@
public boolean isAsyncSupported() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.isAsyncSupported();
@@ -983,8 +919,7 @@
public AsyncContext startAsync() throws IllegalStateException {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.startAsync();
@@ -994,8 +929,7 @@
public AsyncContext startAsync(ServletRequest servletRequest,
ServletResponse servletResponse) throws IllegalStateException {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.startAsync(servletRequest, servletResponse);
@@ -1004,8 +938,7 @@
public DispatcherType getDispatcherType() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getDispatcherType();
@@ -1017,8 +950,7 @@
*/
public ApplicationFilterChain getFilterChain() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getFilterChain();
}
@@ -1031,8 +963,7 @@
*/
public void setFilterChain(ApplicationFilterChain filterChain) {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
request.setFilterChain(filterChain);
}
@@ -1043,8 +974,7 @@
*/
public void nextFilterChain() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
request.nextFilterChain();
}
@@ -1055,8 +985,7 @@
*/
public void releaseFilterChain() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
request.releaseFilterChain();
}
@@ -1065,8 +994,7 @@
public boolean authenticate(HttpServletResponse response) throws IOException,
ServletException {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.authenticate(response);
@@ -1075,8 +1003,7 @@
public void login(String username, String password) throws ServletException {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
request.login(username, password);
@@ -1085,8 +1012,7 @@
public void logout() throws ServletException {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
request.logout();
@@ -1095,8 +1021,7 @@
public Part getPart(String name) throws IOException, ServletException {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getPart(name);
@@ -1105,8 +1030,7 @@
public Collection<Part> getParts() throws IOException, ServletException {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.getParts();
@@ -1114,8 +1038,7 @@
public boolean hasSendfile() {
if (request == null) {
- throw new IllegalStateException(
- sm.getString("requestFacade.nullRequest"));
+ throw MESSAGES.nullRequestFacade();
}
return request.hasSendfile();
Modified: trunk/src/main/java/org/apache/catalina/connector/Response.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/connector/Response.java 2012-08-29 08:36:47 UTC (rev 2073)
+++ trunk/src/main/java/org/apache/catalina/connector/Response.java 2012-08-29 16:44:25 UTC (rev 2074)
@@ -19,6 +19,8 @@
package org.apache.catalina.connector;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
@@ -46,7 +48,6 @@
import org.apache.catalina.security.SecurityUtil;
import org.apache.catalina.util.CharsetMapper;
import org.apache.catalina.util.DateTool;
-import org.apache.catalina.util.StringManager;
import org.apache.coyote.ActionCode;
import org.apache.naming.resources.CacheEntry;
import org.apache.naming.resources.ProxyDirContext;
@@ -91,13 +92,6 @@
"org.apache.coyote.tomcat5.CoyoteResponse/1.0";
- /**
- * The string manager for this package.
- */
- protected static StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
// ----------------------------------------------------- Instance Variables
/**
@@ -572,8 +566,7 @@
throws IOException {
if (usingWriter)
- throw new IllegalStateException
- (sm.getString("coyoteResponse.getOutputStream.ise"));
+ throw MESSAGES.writerAlreadyUsed();
if (applicationOutputStream != null) {
return applicationOutputStream;
@@ -612,8 +605,7 @@
throws IOException {
if (usingOutputStream)
- throw new IllegalStateException
- (sm.getString("coyoteResponse.getWriter.ise"));
+ throw MESSAGES.outputStreamAlreadyUsed();
if (applicationWriter != null) {
return applicationWriter;
@@ -686,8 +678,7 @@
public void resetBuffer() {
if (isCommitted())
- throw new IllegalStateException
- (sm.getString("coyoteResponse.resetBuffer.ise"));
+ throw MESSAGES.cannotResetBuffer();
outputBuffer.reset();
@@ -729,8 +720,7 @@
public void setBufferSize(int size) {
if (isCommitted() || !outputBuffer.isNew())
- throw new IllegalStateException
- (sm.getString("coyoteResponse.setBufferSize.ise"));
+ throw MESSAGES.cannotChangeBufferSize();
outputBuffer.setBufferSize(size);
@@ -1278,8 +1268,7 @@
throws IOException {
if (isCommitted())
- throw new IllegalStateException
- (sm.getString("coyoteResponse.sendError.ise"));
+ throw MESSAGES.cannotSendError();
// Ignore any call from an included servlet
if (included)
@@ -1317,8 +1306,7 @@
throws IOException {
if (isCommitted())
- throw new IllegalStateException
- (sm.getString("coyoteResponse.sendRedirect.ise"));
+ throw MESSAGES.cannotSendRedirect();
// Ignore any call from an included servlet
if (included)
@@ -1345,16 +1333,13 @@
public void startUpgrade() {
if (isCommitted())
- throw new IllegalStateException
- (sm.getString("coyoteResponse.upgrade.ise"));
+ throw MESSAGES.cannotSendUpgrade();
if (!connector.hasIoEvents())
- throw new IllegalStateException
- (sm.getString("coyoteResponse.upgrade.noEvents"));
+ throw MESSAGES.cannotUpgradeWithoutEvents();
if (!request.isEventMode() || request.getAsyncContext() != null)
- throw new IllegalStateException
- (sm.getString("coyoteResponse.upgrade.noHttpEventServlet"));
+ throw MESSAGES.cannotUpgradeWithoutEventServlet();
// Ignore any call from an included servlet
if (included)
@@ -1369,16 +1354,13 @@
throws IOException {
if (isCommitted())
- throw new IllegalStateException
- (sm.getString("coyoteResponse.upgrade.ise"));
+ throw MESSAGES.cannotSendUpgrade();
if (!connector.hasIoEvents())
- throw new IllegalStateException
- (sm.getString("coyoteResponse.upgrade.noEvents"));
+ throw MESSAGES.cannotUpgradeWithoutEvents();
if (!request.isEventMode() || request.getAsyncContext() != null)
- throw new IllegalStateException
- (sm.getString("coyoteResponse.upgrade.noHttpEventServlet"));
+ throw MESSAGES.cannotUpgradeWithoutEventServlet();
// Ignore any call from an included servlet
if (included)
@@ -1397,15 +1379,14 @@
public void sendFile(String path, String absolutePath, long start, long end) {
if (isCommitted())
- throw new IllegalStateException
- (sm.getString("coyoteResponse.sendFile.ise"));
+ throw MESSAGES.cannotSendFile();
// Ignore any call from an included servlet
if (included)
return;
if (!request.hasSendfile())
- throw new IllegalStateException(sm.getString("coyoteResponse.sendFile.no"));
+ throw MESSAGES.noSendFile();
if (Globals.IS_SECURITY_ENABLED) {
if (path != null) {
@@ -1422,7 +1403,7 @@
try {
canonicalPath = new File(absolutePath).getCanonicalPath();
} catch (IOException e) {
- throw new IllegalArgumentException(sm.getString("coyoteResponse.sendFile.path"));
+ throw MESSAGES.invalidSendFilePath(absolutePath);
}
System.getSecurityManager().checkRead(canonicalPath);
coyoteResponse.setSendfilePath(absolutePath);
Modified: trunk/src/main/java/org/apache/catalina/connector/ResponseFacade.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/connector/ResponseFacade.java 2012-08-29 08:36:47 UTC (rev 2073)
+++ trunk/src/main/java/org/apache/catalina/connector/ResponseFacade.java 2012-08-29 16:44:25 UTC (rev 2074)
@@ -18,6 +18,8 @@
package org.apache.catalina.connector;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.IOException;
import java.io.PrintWriter;
import java.security.AccessController;
@@ -33,7 +35,6 @@
import org.apache.catalina.Globals;
import org.apache.catalina.security.SecurityUtil;
-import org.apache.catalina.util.StringManager;
import org.jboss.servlet.http.UpgradableHttpServletResponse;
/**
@@ -107,13 +108,6 @@
/**
- * The string manager for this package.
- */
- protected static StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- /**
* The wrapped response.
*/
protected Response response = null;
@@ -142,8 +136,7 @@
public void finish() {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
response.setSuspended(true);
@@ -153,8 +146,7 @@
public boolean isFinished() {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
return response.isSuspended();
@@ -167,8 +159,7 @@
public String getCharacterEncoding() {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
return response.getCharacterEncoding();
@@ -242,8 +233,7 @@
public int getBufferSize() {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
return response.getBufferSize();
@@ -298,8 +288,7 @@
public boolean isCommitted() {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
return (response.isAppCommitted());
@@ -329,8 +318,7 @@
public Locale getLocale() {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
return response.getLocale();
@@ -350,8 +338,7 @@
public boolean containsHeader(String name) {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
return response.containsHeader(name);
@@ -361,8 +348,7 @@
public String encodeURL(String url) {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
return response.encodeURL(url);
@@ -372,8 +358,7 @@
public String encodeRedirectURL(String url) {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
return response.encodeRedirectURL(url);
@@ -383,8 +368,7 @@
public String encodeUrl(String url) {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
return response.encodeURL(url);
@@ -394,8 +378,7 @@
public String encodeRedirectUrl(String url) {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
return response.encodeRedirectURL(url);
@@ -570,8 +553,7 @@
public String getContentType() {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
return response.getContentType();
@@ -581,8 +563,7 @@
public void setCharacterEncoding(String arg0) {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
response.setCharacterEncoding(arg0);
@@ -591,8 +572,7 @@
public String getHeader(String name) {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
return response.getHeader(name);
@@ -601,8 +581,7 @@
public Collection<String> getHeaderNames() {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
return response.getHeaderNames();
@@ -611,8 +590,7 @@
public Collection<String> getHeaders(String name) {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
return response.getHeaders(name);
@@ -621,8 +599,7 @@
public int getStatus() {
if (response == null) {
- throw new IllegalStateException(
- sm.getString("responseFacade.nullResponse"));
+ throw MESSAGES.nullResponseFacade();
}
return response.getStatus();
Modified: trunk/src/main/java/org/jboss/web/CatalinaLogger.java
===================================================================
--- trunk/src/main/java/org/jboss/web/CatalinaLogger.java 2012-08-29 08:36:47 UTC (rev 2073)
+++ trunk/src/main/java/org/jboss/web/CatalinaLogger.java 2012-08-29 16:44:25 UTC (rev 2074)
@@ -25,6 +25,7 @@
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 static org.jboss.logging.Logger.Level.DEBUG;
import org.jboss.logging.BasicLogger;
import org.jboss.logging.Cause;
@@ -60,6 +61,11 @@
*/
CatalinaLogger REALM_LOGGER = Logger.getMessageLogger(CatalinaLogger.class, "org.apache.catalina.realm");
+ /**
+ * A logger with the category of the package name.
+ */
+ CatalinaLogger CONNECTOR_LOGGER = Logger.getMessageLogger(CatalinaLogger.class, "org.apache.catalina.connector");
+
@LogMessage(level = WARN)
@Message(id = 1000, value = "A valid entry has been removed from client nonce cache to make room for new entries. A replay attack is now possible. To prevent the possibility of replay attacks, reduce nonceValidity or increase cnonceCacheSize. Further warnings of this type will be suppressed for 5 minutes.")
void digestCacheRemove();
@@ -88,4 +94,80 @@
@Message(id = 1006, value = "Missing parent [%s].")
void missingParentJmxRegistration(Object objectName, @Cause Throwable t);
+ @LogMessage(level = INFO)
+ @Message(id = 1007, value = "The connector has already been initialized")
+ void connectorAlreadyInitialized();
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1008, value = "Failed connector [%s] JMX registration.")
+ void failedConnectorJmxRegistration(Object objectName, @Cause Throwable t);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1009, value = "Failed connector [%s] JMX unregistration.")
+ void failedConnectorJmxUnregistration(Object objectName, @Cause Throwable t);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1010, value = "Protocol handler pause failed")
+ void protocolHandlerPauseFailed(@Cause Throwable t);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1011, value = "Protocol handler resume failed")
+ void protocolHandlerResumeFailed(@Cause Throwable t);
+
+ @LogMessage(level = INFO)
+ @Message(id = 1012, value = "The connector has already been started")
+ void connectorAlreadyStarted();
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1012, value = "Failed protocol handler [%s] JMX registration.")
+ void failedProtocolJmxRegistration(Object objectName, @Cause Throwable t);
+
+ @LogMessage(level = INFO)
+ @Message(id = 1013, value = "Cannot proceed with protocol handler JMX registration.")
+ void failedProtocolJmxRegistration();
+
+ @LogMessage(level = INFO)
+ @Message(id = 1014, value = "The connector has not been started")
+ void connectorNotStarted();
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1015, value = "Failed protocol handler [%s] JMX unregistration.")
+ void failedProtocolJmxUnregistration(Object objectName, @Cause Throwable t);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1016, value = "Connector stop failure")
+ void connectorStopFailed(@Cause Throwable t);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1017, value = "The Servlet did not read all available bytes during the processing of the read event")
+ void servletDidNotReadAvailableData();
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1018, value = "An exception or error occurred in the container during the request processing")
+ void exceptionDuringService(@Cause Throwable t);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1019, value = "The AsyncLisnener %s onComplete threw an exception, which will be ignored")
+ void exceptionDuringComplete(String className, @Cause Throwable t);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1020, value = "Invalid URI encoding, will use HTTP default")
+ void invalidEncodingUseHttpDefault(@Cause Throwable t);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1021, value = "Invalid URI encoding, will use straight conversion")
+ void invalidEncoding(@Cause Throwable t);
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 1022, value = "Exception thrown whilst processing multipart")
+ void exceptionProcessingMultipart(@Cause Throwable t);
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 1023, value = "Parameters were not parsed because the size of the posted data was too big. Use the maxPostSize attribute of the connector to resolve this if the application should accept large POSTs.")
+ void postDataTooLarge();
+
+ @LogMessage(level = DEBUG)
+ @Message(id = 1024, value = "Exception thrown whilst processing POSTed parameters")
+ void exceptionProcessingParameters(@Cause Throwable t);
+
}
Modified: trunk/src/main/java/org/jboss/web/CatalinaMessages.java
===================================================================
--- trunk/src/main/java/org/jboss/web/CatalinaMessages.java 2012-08-29 08:36:47 UTC (rev 2073)
+++ trunk/src/main/java/org/jboss/web/CatalinaMessages.java 2012-08-29 16:44:25 UTC (rev 2074)
@@ -22,6 +22,7 @@
package org.jboss.web;
+import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;
@@ -105,9 +106,120 @@
@Message(id = 21, value = "Illegal digest encoding %s")
IllegalArgumentException illegalDigestEncoding(String digest, @Cause UnsupportedEncodingException e);
- @Message(id = 21, value = "Missing MD5 digest")
+ @Message(id = 22, value = "Missing MD5 digest")
IllegalArgumentException noMD5Digest(@Cause NoSuchAlgorithmException e);
+ @Message(id = 23, value = "Protocol handler initialization failed")
+ String protocolHandlerInitFailed(@Cause Throwable t);
+
+ @Message(id = 24, value = "Protocol handler start failed")
+ String protocolHandlerStartFailed(@Cause Throwable t);
+
+ @Message(id = 25, value = "Protocol handler destroy failed")
+ String protocolHandlerDestroyFailed(@Cause Throwable t);
+
+ @Message(id = 26, value = "Failed to instatiate protocol handler")
+ IllegalArgumentException protocolHandlerInstantiationFailed(@Cause Throwable t);
+
+ @Message(id = 27, value = "getWriter() has already been called for this response")
+ IllegalStateException writerAlreadyUsed();
+
+ @Message(id = 28, value = "getOutputStream() has already been called for this response")
+ IllegalStateException outputStreamAlreadyUsed();
+
+ @Message(id = 29, value = "Cannot reset buffer after response has been committed")
+ IllegalStateException cannotResetBuffer();
+
+ @Message(id = 30, value = "Cannot change buffer size after data has been written")
+ IllegalStateException cannotChangeBufferSize();
+
+ @Message(id = 31, value = "Cannot call sendError() after the response has been committed")
+ IllegalStateException cannotSendError();
+
+ @Message(id = 32, value = "Cannot call sendRedirect() after the response has been committed")
+ IllegalStateException cannotSendRedirect();
+
+ @Message(id = 33, value = "Cannot call sendUpgrade() after the response has been committed")
+ IllegalStateException cannotSendUpgrade();
+
+ @Message(id = 34, value = "Cannot upgrade from HTTP/1.1 without IO events")
+ IllegalStateException cannotUpgradeWithoutEvents();
+
+ @Message(id = 35, value = "Cannot upgrade from HTTP/1.1 is not using an HttpEventServlet")
+ IllegalStateException cannotUpgradeWithoutEventServlet();
+
+ @Message(id = 36, value = "Cannot call sendFile() after the response has been committed")
+ IllegalStateException cannotSendFile();
+
+ @Message(id = 37, value = "Sendfile is disabled")
+ IllegalStateException noSendFile();
+
+ @Message(id = 38, value = "Invalid path for sendfile %s")
+ IllegalStateException invalidSendFilePath(String path);
+
+ @Message(id = 39, value = "getReader() has already been called for this request")
+ IllegalStateException readerAlreadyUsed();
+
+ @Message(id = 40, value = "getInputStream() has already been called for this request")
+ IllegalStateException inputStreamAlreadyUsed();
+
+ @Message(id = 41, value = "Exception thrown by attributes event listener")
+ String attributesEventListenerException();
+
+ @Message(id = 42, value = "Cannot call setAttribute with a null name")
+ IllegalStateException attributeNameNotSpecified();
+
+ @Message(id = 43, value = "Cannot create a session after the response has been committed")
+ IllegalStateException cannotCreateSession();
+
+ @Message(id = 44, value = "Parameters were not parsed because the size of the posted data was too big. Use the maxPostSize attribute of the connector to resolve this if the application should accept large POSTs.")
+ IllegalStateException postDataTooLarge();
+
+ @Message(id = 45, value = "The request is not multipart content")
+ String notMultipart();
+
+ @Message(id = 46, value = "Exception thrown whilst processing multipart")
+ IllegalStateException multipartProcessingFailed(@Cause Throwable t);
+
+ @Message(id = 47, value = "Exception thrown whilst processing multipart")
+ IOException multipartIoProcessingFailed(@Cause Throwable t);
+
+ @Message(id = 48, value = "The servlet or filters that are being used by this request do not support async operation")
+ IllegalStateException noAsync();
+
+ @Message(id = 49, value = "Response has been closed already")
+ IllegalStateException asyncClose();
+
+ @Message(id = 50, value = "Cannot start async")
+ IllegalStateException cannotStartAsync();
+
+ @Message(id = 51, value = "Error invoking onStartAsync on listener of class {0}")
+ IllegalStateException errorStartingAsync(String listenerClassName, @Cause Throwable t);
+
+ @Message(id = 52, value = "No authenticator available for programmatic login")
+ String noAuthenticator();
+
+ @Message(id = 53, value = "Failed to authenticate a principal")
+ String authenticationFailure();
+
+ @Message(id = 54, value = "Exception logging out user")
+ String logoutFailure();
+
+ @Message(id = 55, value = "Could not determine or access context for server absolute URI %s")
+ IllegalStateException cannotFindDispatchContext(String uri);
+
+ @Message(id = 56, value = "Failed to instantiate class %s")
+ String listenerCreationFailed(String className);
+
+ @Message(id = 57, value = "The request object has been recycled and is no longer associated with this facade")
+ IllegalStateException nullRequestFacade();
+
+ @Message(id = 58, value = "The response object has been recycled and is no longer associated with this facade")
+ IllegalStateException nullResponseFacade();
+
+ @Message(id = 60, value = "Stream closed")
+ IOException streamClosed();
+
@Message(id = 64, value = "Error report")
String errorReport();
12 years, 4 months
JBossWeb SVN: r2073 - in trunk/src/main/java/org: jboss/web and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-08-29 04:36:47 -0400 (Wed, 29 Aug 2012)
New Revision: 2073
Modified:
trunk/src/main/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
trunk/src/main/java/org/jboss/web/CoyoteMessages.java
Log:
Missing i18n
Modified: trunk/src/main/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
===================================================================
--- trunk/src/main/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java 2012-08-29 08:10:44 UTC (rev 2072)
+++ trunk/src/main/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java 2012-08-29 08:36:47 UTC (rev 2073)
@@ -17,6 +17,8 @@
package org.apache.coyote.http11.filters;
+import static org.jboss.web.CoyoteMessages.MESSAGES;
+
import java.io.IOException;
import org.apache.coyote.InputBuffer;
@@ -276,22 +278,22 @@
// In non blocking mode, no new chunk follows, even if data was present
int n = readBytes();
if (n < 0) {
- throw new IOException("Invalid chunk header");
+ throw MESSAGES.invalidChunkHeader();
} else if (n == 0) {
return false;
}
}
if (buf[pos] == Constants.CR) {
- if (crfound) throw new IOException("Invalid CRLF, two CR characters encountered.");
+ if (crfound) throw MESSAGES.invalidCrlfTwoCr();
crfound = true;
} else if (buf[pos] == Constants.LF) {
- if (!crfound) throw new IOException("Invalid CRLF, no CR character encountered.");
+ if (!crfound) throw MESSAGES.invalidCrlfNoCr();
eol = true;
} else if (buf[pos] == Constants.SEMI_COLON) {
trailer = true;
} else if (buf[pos] < 0) {
- throw new IOException("Invalid chunk header");
+ throw MESSAGES.invalidChunkHeader();
} else if (!trailer) {
//don't read data after the trailer
if (HexUtils.DEC[buf[pos] & 0xff] != -1) {
@@ -301,7 +303,7 @@
} else {
//we shouldn't allow invalid, non hex characters
//in the chunked header
- throw new IOException("Invalid chunk header");
+ throw MESSAGES.invalidChunkHeader();
}
}
@@ -310,7 +312,7 @@
}
if (!readDigit || (result < 0))
- throw new IOException("Invalid chunk header");
+ throw MESSAGES.invalidChunkHeader();
if (result == 0)
endChunk = true;
@@ -335,17 +337,17 @@
if (pos >= lastValid) {
if (readBytes() <= 0)
- throw new IOException("Invalid CRLF");
+ throw MESSAGES.invalidCrlf();
}
if (buf[pos] == Constants.CR) {
- if (crfound) throw new IOException("Invalid CRLF, two CR characters encountered.");
+ if (crfound) throw MESSAGES.invalidCrlfTwoCr();
crfound = true;
} else if (buf[pos] == Constants.LF) {
- if (!crfound) throw new IOException("Invalid CRLF, no CR character encountered.");
+ if (!crfound) throw MESSAGES.invalidCrlfNoCr();
eol = true;
} else {
- throw new IOException("Invalid CRLF");
+ throw MESSAGES.invalidCrlf();
}
pos++;
Modified: trunk/src/main/java/org/jboss/web/CoyoteMessages.java
===================================================================
--- trunk/src/main/java/org/jboss/web/CoyoteMessages.java 2012-08-29 08:10:44 UTC (rev 2072)
+++ trunk/src/main/java/org/jboss/web/CoyoteMessages.java 2012-08-29 08:36:47 UTC (rev 2073)
@@ -22,6 +22,8 @@
package org.jboss.web;
+import java.io.IOException;
+
import org.jboss.logging.Cause;
import org.jboss.logging.Message;
import org.jboss.logging.MessageBundle;
@@ -90,4 +92,16 @@
@Message(id = 2016, value = "Backlog is present")
String invalidBacklog();
+ @Message(id = 2017, value = "Invalid CRLF, no CR character encountered")
+ IOException invalidCrlfNoCr();
+
+ @Message(id = 2018, value = "Invalid CRLF, two CR characters encountered")
+ IOException invalidCrlfTwoCr();
+
+ @Message(id = 2019, value = "Invalid CRLF")
+ IOException invalidCrlf();
+
+ @Message(id = 2019, value = "Invalid chunk header")
+ IOException invalidChunkHeader();
+
}
12 years, 4 months
JBossWeb SVN: r2072 - in trunk/src/main/java/org/apache/coyote: http11 and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-08-29 04:10:44 -0400 (Wed, 29 Aug 2012)
New Revision: 2072
Modified:
trunk/src/main/java/org/apache/coyote/ajp/AjpAprProcessor.java
trunk/src/main/java/org/apache/coyote/ajp/AjpMessage.java
trunk/src/main/java/org/apache/coyote/http11/AbstractInternalOutputBuffer.java
trunk/src/main/java/org/apache/coyote/http11/Http11AprProcessor.java
trunk/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java
trunk/src/main/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
trunk/src/main/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
Log:
Various minor byte handling cleanups.
Modified: trunk/src/main/java/org/apache/coyote/ajp/AjpAprProcessor.java
===================================================================
--- trunk/src/main/java/org/apache/coyote/ajp/AjpAprProcessor.java 2012-08-29 07:51:24 UTC (rev 2071)
+++ trunk/src/main/java/org/apache/coyote/ajp/AjpAprProcessor.java 2012-08-29 08:10:44 UTC (rev 2072)
@@ -967,7 +967,7 @@
int port = 0;
int mult = 1;
for (int i = valueL - 1; i > colonPos; i--) {
- int charValue = HexUtils.DEC[(int) valueB[i + valueS]];
+ int charValue = HexUtils.DEC[valueB[i + valueS] & 0xff];
if (charValue == -1) {
// Invalid character
error = true;
Modified: trunk/src/main/java/org/apache/coyote/ajp/AjpMessage.java
===================================================================
--- trunk/src/main/java/org/apache/coyote/ajp/AjpMessage.java 2012-08-29 07:51:24 UTC (rev 2071)
+++ trunk/src/main/java/org/apache/coyote/ajp/AjpMessage.java 2012-08-29 08:10:44 UTC (rev 2072)
@@ -242,10 +242,8 @@
// but is the only consistent approach within the current
// servlet framework. It must suffice until servlet output
// streams properly encode their output.
- if ((c <= 31) && (c != 9)) {
+ if (((c <= 31) && (c != 9)) || c == 127 || c > 255) {
c = ' ';
- } else if (c == 127) {
- c = ' ';
}
appendByte(c);
}
Modified: trunk/src/main/java/org/apache/coyote/http11/AbstractInternalOutputBuffer.java
===================================================================
--- trunk/src/main/java/org/apache/coyote/http11/AbstractInternalOutputBuffer.java 2012-08-29 07:51:24 UTC (rev 2071)
+++ trunk/src/main/java/org/apache/coyote/http11/AbstractInternalOutputBuffer.java 2012-08-29 08:10:44 UTC (rev 2072)
@@ -577,8 +577,7 @@
// but is the only consistent approach within the current
// servlet framework. It must suffice until servlet output
// streams properly encode their output.
-
- if ((c <= 31 && c != 9) || c == 127) {
+ if (((c <= 31) && (c != 9)) || c == 127 || c > 255) {
c = ' ';
}
Modified: trunk/src/main/java/org/apache/coyote/http11/Http11AprProcessor.java
===================================================================
--- trunk/src/main/java/org/apache/coyote/http11/Http11AprProcessor.java 2012-08-29 07:51:24 UTC (rev 2071)
+++ trunk/src/main/java/org/apache/coyote/http11/Http11AprProcessor.java 2012-08-29 08:10:44 UTC (rev 2072)
@@ -1542,7 +1542,7 @@
int port = 0;
int mult = 1;
for (int i = valueL - 1; i > colonPos; i--) {
- int charValue = HexUtils.DEC[valueB[i + valueS]];
+ int charValue = HexUtils.DEC[valueB[i + valueS] & 0xff];
if (charValue == -1) {
// Invalid character
error = true;
Modified: trunk/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java
===================================================================
--- trunk/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java 2012-08-29 07:51:24 UTC (rev 2071)
+++ trunk/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java 2012-08-29 08:10:44 UTC (rev 2072)
@@ -1078,7 +1078,7 @@
int port = 0;
int mult = 1;
for (int i = valueL - 1; i > colonPos; i--) {
- int charValue = HexUtils.DEC[valueB[i + valueS]];
+ int charValue = HexUtils.DEC[valueB[i + valueS] & 0xff];
if (charValue == -1) {
// Invalid character
error = true;
Modified: trunk/src/main/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
===================================================================
--- trunk/src/main/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2012-08-29 07:51:24 UTC (rev 2071)
+++ trunk/src/main/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2012-08-29 08:10:44 UTC (rev 2072)
@@ -675,10 +675,8 @@
// but is the only consistent approach within the current
// servlet framework. It must suffice until servlet output
// streams properly encode their output.
- if ((c <= 31) && (c != 9)) {
+ if (((c <= 31) && (c != 9)) || c == 127 || c > 255) {
c = ' ';
- } else if (c == 127) {
- c = ' ';
}
buf[pos++] = (byte) c;
}
Modified: trunk/src/main/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
===================================================================
--- trunk/src/main/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java 2012-08-29 07:51:24 UTC (rev 2071)
+++ trunk/src/main/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java 2012-08-29 08:10:44 UTC (rev 2072)
@@ -266,6 +266,7 @@
int result = 0;
boolean eol = false;
+ boolean crfound = false;
boolean readDigit = false;
boolean trailer = false;
@@ -282,7 +283,10 @@
}
if (buf[pos] == Constants.CR) {
+ if (crfound) throw new IOException("Invalid CRLF, two CR characters encountered.");
+ crfound = true;
} else if (buf[pos] == Constants.LF) {
+ if (!crfound) throw new IOException("Invalid CRLF, no CR character encountered.");
eol = true;
} else if (buf[pos] == Constants.SEMI_COLON) {
trailer = true;
@@ -290,7 +294,7 @@
throw new IOException("Invalid chunk header");
} else if (!trailer) {
//don't read data after the trailer
- if (HexUtils.DEC[buf[pos]] != -1) {
+ if (HexUtils.DEC[buf[pos] & 0xff] != -1) {
readDigit = true;
result *= 16;
result += HexUtils.DEC[buf[pos]];
12 years, 4 months
JBossWeb SVN: r2071 - trunk/src/main/java/org/apache/catalina/authenticator.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-08-29 03:51:24 -0400 (Wed, 29 Aug 2012)
New Revision: 2071
Modified:
trunk/src/main/java/org/apache/catalina/authenticator/FormAuthenticator.java
Log:
- Port fix of the fix for FORM: Save the decoded URI.
Modified: trunk/src/main/java/org/apache/catalina/authenticator/FormAuthenticator.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/authenticator/FormAuthenticator.java 2012-08-28 13:22:31 UTC (rev 2070)
+++ trunk/src/main/java/org/apache/catalina/authenticator/FormAuthenticator.java 2012-08-29 07:51:24 UTC (rev 2071)
@@ -302,6 +302,7 @@
String uri = request.getContextPath() + landingPage;
SavedRequest saved = new SavedRequest();
saved.setRequestURI(uri);
+ saved.setDecodedRequestURI(uri);
request.getSessionInternal(true).setNote(
Constants.FORM_REQUEST_NOTE, saved);
response.sendRedirect(response.encodeRedirectURL(uri));
@@ -331,6 +332,7 @@
String uri = request.getContextPath() + landingPage;
SavedRequest saved = new SavedRequest();
saved.setRequestURI(uri);
+ saved.setDecodedRequestURI(uri);
session.setNote(Constants.FORM_REQUEST_NOTE, saved);
response.sendRedirect(response.encodeRedirectURL(uri));
}
12 years, 4 months
JBossWeb SVN: r2070 - in trunk/src/main/java/org/apache/catalina: realm and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-08-28 09:22:31 -0400 (Tue, 28 Aug 2012)
New Revision: 2070
Added:
trunk/src/main/java/org/apache/catalina/util/ConcurrentMessageDigest.java
Modified:
trunk/src/main/java/org/apache/catalina/authenticator/DigestAuthenticator.java
trunk/src/main/java/org/apache/catalina/authenticator/FormAuthenticator.java
trunk/src/main/java/org/apache/catalina/authenticator/SavedRequest.java
trunk/src/main/java/org/apache/catalina/realm/RealmBase.java
trunk/src/main/java/org/apache/catalina/util/MD5Encoder.java
Log:
- Port some auth fixes.
- Digest fixes.
- Remove supposedly useless form redirection.
- Fix form in some rare cases when the session id could get in the way.
Modified: trunk/src/main/java/org/apache/catalina/authenticator/DigestAuthenticator.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/authenticator/DigestAuthenticator.java 2012-08-28 10:41:30 UTC (rev 2069)
+++ trunk/src/main/java/org/apache/catalina/authenticator/DigestAuthenticator.java 2012-08-28 13:22:31 UTC (rev 2070)
@@ -5,20 +5,17 @@
* The ASF licenses this file to You 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.apache.catalina.authenticator;
-
import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
@@ -27,7 +24,6 @@
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Random;
-import java.util.StringTokenizer;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -38,42 +34,25 @@
import org.apache.catalina.Realm;
import org.apache.catalina.connector.Request;
import org.apache.catalina.deploy.LoginConfig;
+import org.apache.catalina.util.ConcurrentMessageDigest;
import org.apache.catalina.util.MD5Encoder;
-import org.jboss.logging.Logger;
+import org.apache.tomcat.util.buf.EncodingToCharset;
import org.jboss.web.CatalinaLogger;
-
/**
* An <b>Authenticator</b> and <b>Valve</b> implementation of HTTP DIGEST
* Authentication (see RFC 2069).
*
* @author Craig R. McClanahan
* @author Remy Maucherat
- * @version $Id: DigestAuthenticator.java 1848 2011-10-11 15:29:56Z remy.maucherat(a)jboss.com $
+ * @version $Id: DigestAuthenticator.java 1377853 2012-08-27 20:53:56Z markt $
*/
+public class DigestAuthenticator extends AuthenticatorBase {
-public class DigestAuthenticator
- extends AuthenticatorBase {
- private static Logger log = Logger.getLogger(DigestAuthenticator.class);
-
-
// -------------------------------------------------------------- Constants
/**
- * The MD5 helper object for this class.
- */
- protected static final MD5Encoder md5Encoder = new MD5Encoder();
-
-
- /**
- * Descriptive information about this implementation.
- */
- protected static final String info =
- "org.apache.catalina.authenticator.DigestAuthenticator/1.0";
-
-
- /**
* Tomcat's DIGEST implementation only supports auth quality of protection.
*/
protected static final String QOP = "auth";
@@ -83,9 +62,11 @@
public DigestAuthenticator() {
super();
+ setCache(false);
try {
- if (md5Helper == null)
+ if (md5Helper == null) {
md5Helper = MessageDigest.getInstance("MD5");
+ }
} catch (NoSuchAlgorithmException e) {
throw new IllegalStateException(e);
}
@@ -97,21 +78,22 @@
/**
* MD5 message digest provider.
+ * @deprecated Unused - will be removed in Tomcat 8.0.x onwards
*/
protected static MessageDigest md5Helper;
/**
- * List of client nonce values currently being tracked
+ * List of server nonce values currently being tracked
*/
- protected Map<String,NonceInfo> cnonces;
+ protected Map<String,NonceInfo> nonces;
/**
- * Maximum number of client nonces to keep in the cache. If not specified,
+ * Maximum number of server nonces to keep in the cache. If not specified,
* the default value of 1000 is used.
*/
- protected int cnonceCacheSize = 1000;
+ protected int nonceCacheSize = 1000;
/**
@@ -141,27 +123,16 @@
// ------------------------------------------------------------- Properties
- /**
- * Return descriptive information about this Valve implementation.
- */
- @Override
- public String getInfo() {
-
- return (info);
-
+ public int getNonceCacheSize() {
+ return nonceCacheSize;
}
- public int getCnonceCacheSize() {
- return cnonceCacheSize;
+ public void setNonceCacheSize(int nonceCacheSize) {
+ this.nonceCacheSize = nonceCacheSize;
}
- public void setCnonceCacheSize(int cnonceCacheSize) {
- this.cnonceCacheSize = cnonceCacheSize;
- }
-
-
public String getKey() {
return key;
}
@@ -212,8 +183,6 @@
*
* @param request Request we are processing
* @param response Response we are creating
- * @param config Login configuration describing how authentication
- * should be performed
*
* @exception IOException if an input/output error occurs
*/
@@ -221,19 +190,18 @@
public boolean authenticate(Request request,
HttpServletResponse response,
LoginConfig config)
- throws IOException {
+ throws IOException {
// Have we already authenticated someone?
Principal principal = request.getUserPrincipal();
//String ssoId = (String) request.getNote(Constants.REQ_SSOID_NOTE);
if (principal != null) {
- if (log.isDebugEnabled())
- log.debug("Already authenticated '" + principal.getName() + "'");
// Associate the session with any existing SSO session in order
// to get coordinated session invalidation at logout
String ssoId = (String) request.getNote(Constants.REQ_SSOID_NOTE);
- if (ssoId != null)
+ if (ssoId != null) {
associate(ssoId, request.getSessionInternal(true));
+ }
return (true);
}
@@ -265,19 +233,20 @@
// Validate any credentials already included with this request
String authorization = request.getHeader("authorization");
DigestInfo digestInfo = new DigestInfo(getOpaque(), getNonceValidity(),
- getKey(), cnonces, isValidateUri());
+ getKey(), nonces, isValidateUri());
if (authorization != null) {
- if (digestInfo.validate(request, authorization, config)) {
- principal = digestInfo.authenticate(context.getRealm());
+ if (digestInfo.parse(request, authorization)) {
+ if (digestInfo.validate(request, config)) {
+ principal = digestInfo.authenticate(context.getRealm());
+ }
+
+ if (principal != null && !digestInfo.isNonceStale()) {
+ register(request, response, principal,
+ HttpServletRequest.DIGEST_AUTH,
+ digestInfo.getUsername(), null);
+ return true;
+ }
}
-
- if (principal != null) {
- String username = parseUsername(authorization);
- register(request, response, principal,
- HttpServletRequest.DIGEST_AUTH,
- username, null);
- return (true);
- }
}
// Send an "unauthorized" response and an appropriate challenge
@@ -287,11 +256,9 @@
String nonce = generateNonce(request);
setAuthenticateHeader(request, response, config, nonce,
- digestInfo.isNonceStale());
+ principal != null && digestInfo.isNonceStale());
response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
- // hres.flushBuffer();
- return (false);
-
+ return false;
}
@@ -299,42 +266,6 @@
/**
- * Parse the username from the specified authorization string. If none
- * can be identified, return <code>null</code>
- *
- * @param authorization Authorization string to be parsed
- */
- protected String parseUsername(String authorization) {
-
- // Validate the authorization credentials format
- if (authorization == null)
- return (null);
- if (!authorization.startsWith("Digest "))
- return (null);
- authorization = authorization.substring(7).trim();
-
- StringTokenizer commaTokenizer =
- new StringTokenizer(authorization, ",");
-
- while (commaTokenizer.hasMoreTokens()) {
- String currentToken = commaTokenizer.nextToken();
- int equalSign = currentToken.indexOf('=');
- if (equalSign < 0)
- return null;
- String currentTokenName =
- currentToken.substring(0, equalSign).trim();
- String currentTokenValue =
- currentToken.substring(equalSign + 1).trim();
- if ("username".equals(currentTokenName))
- return (removeQuotes(currentTokenValue));
- }
-
- return (null);
-
- }
-
-
- /**
* Removes the quotes on a string. RFC2617 states quotes are optional for
* all parameters except realm.
*/
@@ -347,7 +278,7 @@
} else if (quotedString.length() > 2) {
return quotedString.substring(1, quotedString.length() - 1);
} else {
- return new String();
+ return "";
}
}
@@ -369,16 +300,20 @@
long currentTime = System.currentTimeMillis();
-
+
String ipTimeKey =
request.getRemoteAddr() + ":" + currentTime + ":" + getKey();
- byte[] buffer;
- synchronized (md5Helper) {
- buffer = md5Helper.digest(ipTimeKey.getBytes());
+ byte[] buffer = ConcurrentMessageDigest.digestMD5(
+ ipTimeKey.getBytes(EncodingToCharset.ISO_8859_1));
+ String nonce = currentTime + ":" + MD5Encoder.encode(buffer);
+
+ NonceInfo info = new NonceInfo(currentTime, 100);
+ synchronized (nonces) {
+ nonces.put(nonce, info);
}
- return currentTime + ":" + md5Encoder.encode(buffer);
+ return nonce;
}
@@ -405,11 +340,9 @@
*
* @param request HTTP Servlet request
* @param response HTTP Servlet response
- * @param config Login configuration describing how authentication
- * should be performed
* @param nonce nonce token
*/
- protected void setAuthenticateHeader(Request request,
+ protected void setAuthenticateHeader(HttpServletRequest request,
HttpServletResponse response,
LoginConfig config,
String nonce,
@@ -431,13 +364,13 @@
getOpaque() + "\"";
}
- response.setHeader("WWW-Authenticate", authenticateHeader);
+ response.setHeader(AUTH_HEADER_NAME, authenticateHeader);
}
// ------------------------------------------------------- Lifecycle Methods
-
+
@Override
public void start() throws LifecycleException {
super.start();
@@ -461,14 +394,14 @@
if (getKey() == null) {
setKey(generateSessionId(random));
}
-
+
// Generate the opaque string the same way
if (getOpaque() == null) {
setOpaque(generateSessionId(random));
}
-
- cnonces = new LinkedHashMap<String, DigestAuthenticator.NonceInfo>() {
+ nonces = new LinkedHashMap<String, DigestAuthenticator.NonceInfo>() {
+
private static final long serialVersionUID = 1L;
private static final long LOG_SUPPRESS_TIME = 5 * 60 * 1000;
@@ -479,7 +412,7 @@
Map.Entry<String,NonceInfo> eldest) {
// This is called from a sync so keep it simple
long currentTime = System.currentTimeMillis();
- if (size() > getCnonceCacheSize()) {
+ if (size() > getNonceCacheSize()) {
if (lastLog < currentTime &&
currentTime - eldest.getValue().getTimestamp() <
getNonceValidity()) {
@@ -493,13 +426,13 @@
}
};
}
-
+
private static class DigestInfo {
- private String opaque;
- private long nonceValidity;
- private String key;
- private Map<String,NonceInfo> cnonces;
+ private final String opaque;
+ private final long nonceValidity;
+ private final String key;
+ private final Map<String,NonceInfo> nonces;
private boolean validateUri = true;
private String userName = null;
@@ -511,21 +444,27 @@
private String cnonce = null;
private String realmName = null;
private String qop = null;
+ private String opaqueReceived = null;
private boolean nonceStale = false;
public DigestInfo(String opaque, long nonceValidity, String key,
- Map<String,NonceInfo> cnonces, boolean validateUri) {
+ Map<String,NonceInfo> nonces, boolean validateUri) {
this.opaque = opaque;
this.nonceValidity = nonceValidity;
this.key = key;
- this.cnonces = cnonces;
+ this.nonces = nonces;
this.validateUri = validateUri;
}
- public boolean validate(Request request, String authorization,
- LoginConfig config) {
+
+ public String getUsername() {
+ return userName;
+ }
+
+
+ public boolean parse(Request request, String authorization) {
// Validate the authorization credentials format
if (authorization == null) {
return false;
@@ -539,12 +478,12 @@
String[] tokens = authorization.split(",(?=(?:[^\"]*\"[^\"]*\")+$)");
method = request.getMethod();
- String opaque = null;
for (int i = 0; i < tokens.length; i++) {
String currentToken = tokens[i];
- if (currentToken.length() == 0)
+ if (currentToken.length() == 0) {
continue;
+ }
int equalSign = currentToken.indexOf('=');
if (equalSign < 0) {
@@ -554,26 +493,39 @@
currentToken.substring(0, equalSign).trim();
String currentTokenValue =
currentToken.substring(equalSign + 1).trim();
- if ("username".equals(currentTokenName))
+ if ("username".equals(currentTokenName)) {
userName = removeQuotes(currentTokenValue);
- if ("realm".equals(currentTokenName))
+ }
+ if ("realm".equals(currentTokenName)) {
realmName = removeQuotes(currentTokenValue, true);
- if ("nonce".equals(currentTokenName))
+ }
+ if ("nonce".equals(currentTokenName)) {
nonce = removeQuotes(currentTokenValue);
- if ("nc".equals(currentTokenName))
+ }
+ if ("nc".equals(currentTokenName)) {
nc = removeQuotes(currentTokenValue);
- if ("cnonce".equals(currentTokenName))
+ }
+ if ("cnonce".equals(currentTokenName)) {
cnonce = removeQuotes(currentTokenValue);
- if ("qop".equals(currentTokenName))
+ }
+ if ("qop".equals(currentTokenName)) {
qop = removeQuotes(currentTokenValue);
- if ("uri".equals(currentTokenName))
+ }
+ if ("uri".equals(currentTokenName)) {
uri = removeQuotes(currentTokenValue);
- if ("response".equals(currentTokenName))
+ }
+ if ("response".equals(currentTokenName)) {
response = removeQuotes(currentTokenValue);
- if ("opaque".equals(currentTokenName))
- opaque = removeQuotes(currentTokenValue);
+ }
+ if ("opaque".equals(currentTokenName)) {
+ opaqueReceived = removeQuotes(currentTokenValue);
+ }
}
+ return true;
+ }
+
+ public boolean validate(Request request, LoginConfig config) {
if ( (userName == null) || (realmName == null) || (nonce == null)
|| (uri == null) || (response == null) ) {
return false;
@@ -589,7 +541,23 @@
uriQuery = request.getRequestURI() + "?" + query;
}
if (!uri.equals(uriQuery)) {
- return false;
+ // Some clients (older Android) use an absolute URI for
+ // DIGEST but a relative URI in the request line.
+ // request. 2.3.5 < fixed Android version <= 4.0.3
+ String host = request.getHeader("host");
+ String scheme = request.getScheme();
+ if (host != null && !uriQuery.startsWith(scheme)) {
+ StringBuilder absolute = new StringBuilder();
+ absolute.append(scheme);
+ absolute.append("://");
+ absolute.append(host);
+ absolute.append(uriQuery);
+ if (!uri.equals(absolute.toString())) {
+ return false;
+ }
+ } else {
+ return false;
+ }
}
}
@@ -601,9 +569,9 @@
if (!lcRealm.equals(realmName)) {
return false;
}
-
+
// Validate the opaque string
- if (!this.opaque.equals(opaque)) {
+ if (!opaque.equals(opaqueReceived)) {
return false;
}
@@ -622,15 +590,15 @@
long currentTime = System.currentTimeMillis();
if ((currentTime - nonceTime) > nonceValidity) {
nonceStale = true;
- return false;
+ synchronized (nonces) {
+ nonces.remove(nonce);
+ }
}
String serverIpTimeKey =
request.getRemoteAddr() + ":" + nonceTime + ":" + key;
- byte[] buffer = null;
- synchronized (md5Helper) {
- buffer = md5Helper.digest(serverIpTimeKey.getBytes());
- }
- String md5ServerIpTimeKey = md5Encoder.encode(buffer);
+ byte[] buffer = ConcurrentMessageDigest.digestMD5(
+ serverIpTimeKey.getBytes(EncodingToCharset.ISO_8859_1));
+ String md5ServerIpTimeKey = MD5Encoder.encode(buffer);
if (!md5ServerIpTimeKey.equals(md5clientIpTimeKey)) {
return false;
}
@@ -641,7 +609,7 @@
}
// Validate cnonce and nc
- // Check if presence of nc and nonce is consistent with presence of qop
+ // Check if presence of nc and Cnonce is consistent with presence of qop
if (qop == null) {
if (cnonce != null || nc != null) {
return false;
@@ -650,7 +618,9 @@
if (cnonce == null || nc == null) {
return false;
}
- if (nc.length() != 8) {
+ // RFC 2617 says nc must be 8 digits long. Older Android clients
+ // use 6. 2.3.5 < fixed Android version <= 4.0.3
+ if (nc.length() < 6 || nc.length() > 8) {
return false;
}
long count;
@@ -660,21 +630,18 @@
return false;
}
NonceInfo info;
- synchronized (cnonces) {
- info = cnonces.get(cnonce);
+ synchronized (nonces) {
+ info = nonces.get(nonce);
}
if (info == null) {
- info = new NonceInfo();
+ // Nonce is valid but not in cache. It must have dropped out
+ // of the cache - force a re-authentication
+ nonceStale = true;
} else {
- if (count <= info.getCount()) {
+ if (!info.nonceCountValid(count)) {
return false;
}
}
- info.setCount(count);
- info.setTimestamp(currentTime);
- synchronized (cnonces) {
- cnonces.put(cnonce, info);
- }
}
return true;
}
@@ -688,11 +655,9 @@
// MD5(Method + ":" + uri)
String a2 = method + ":" + uri;
- byte[] buffer;
- synchronized (md5Helper) {
- buffer = md5Helper.digest(a2.getBytes());
- }
- String md5a2 = md5Encoder.encode(buffer);
+ byte[] buffer = ConcurrentMessageDigest.digestMD5(
+ a2.getBytes(EncodingToCharset.ISO_8859_1));
+ String md5a2 = MD5Encoder.encode(buffer);
return realm.authenticate(userName, response, nonce, nc, cnonce,
qop, realmName, md5a2);
@@ -701,21 +666,33 @@
}
private static class NonceInfo {
- private volatile long count;
private volatile long timestamp;
-
- public void setCount(long l) {
- count = l;
+ private volatile boolean seen[];
+ private volatile int offset;
+ private volatile int count = 0;
+
+ public NonceInfo(long currentTime, int seenWindowSize) {
+ this.timestamp = currentTime;
+ seen = new boolean[seenWindowSize];
+ offset = seenWindowSize / 2;
}
-
- public long getCount() {
- return count;
+
+ public synchronized boolean nonceCountValid(long nonceCount) {
+ if ((count - offset) >= nonceCount ||
+ (nonceCount > count - offset + seen.length)) {
+ return false;
+ }
+ int checkIndex = (int) ((nonceCount + offset) % seen.length);
+ if (seen[checkIndex]) {
+ return false;
+ } else {
+ seen[checkIndex] = true;
+ seen[count % seen.length] = false;
+ count++;
+ return true;
+ }
}
-
- public void setTimestamp(long l) {
- timestamp = l;
- }
-
+
public long getTimestamp() {
return timestamp;
}
Modified: trunk/src/main/java/org/apache/catalina/authenticator/FormAuthenticator.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/authenticator/FormAuthenticator.java 2012-08-28 10:41:30 UTC (rev 2069)
+++ trunk/src/main/java/org/apache/catalina/authenticator/FormAuthenticator.java 2012-08-28 13:22:31 UTC (rev 2070)
@@ -422,10 +422,10 @@
return (false);
// Does the request URI match?
- String requestURI = request.getRequestURI();
- if (requestURI == null)
+ String decodedRequestURI = request.getDecodedRequestURI();
+ if (decodedRequestURI == null)
return (false);
- return (requestURI.equals(sreq.getRequestURI()));
+ return (decodedRequestURI.equals(sreq.getDecodedRequestURI()));
}
@@ -598,6 +598,7 @@
saved.setMethod(request.getMethod());
saved.setQueryString(request.getQueryString());
saved.setRequestURI(request.getRequestURI());
+ saved.setDecodedRequestURI(request.getDecodedRequestURI());
// Stash the SavedRequest in our session for later use
session.setNote(Constants.FORM_REQUEST_NOTE, saved);
Modified: trunk/src/main/java/org/apache/catalina/authenticator/SavedRequest.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/authenticator/SavedRequest.java 2012-08-28 10:41:30 UTC (rev 2069)
+++ trunk/src/main/java/org/apache/catalina/authenticator/SavedRequest.java 2012-08-28 13:22:31 UTC (rev 2070)
@@ -169,6 +169,20 @@
/**
+ * The decoded request URI associated with this Request.
+ */
+ private String decodedRequestURI = null;
+
+ public String getDecodedRequestURI() {
+ return (this.decodedRequestURI);
+ }
+
+ public void setDecodedRequestURI(String decodedRequestURI) {
+ this.decodedRequestURI = decodedRequestURI;
+ }
+
+
+ /**
* The body of this request.
*/
private ByteChunk body = null;
Modified: trunk/src/main/java/org/apache/catalina/realm/RealmBase.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/realm/RealmBase.java 2012-08-28 10:41:30 UTC (rev 2069)
+++ trunk/src/main/java/org/apache/catalina/realm/RealmBase.java 2012-08-28 13:22:31 UTC (rev 2070)
@@ -50,7 +50,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;
@@ -730,31 +729,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 (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
- CatalinaLogger.REALM_LOGGER.debug(" Allow access to login page " + loginPage);
- return (true);
- }
- String errorPage = config.getErrorPage();
- if (errorPage.equals(requestURI)) {
- if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
- CatalinaLogger.REALM_LOGGER.debug(" Allow access to error page " + errorPage);
- return (true);
- }
- if (requestURI.endsWith(Constants.FORM_ACTION)) {
- if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
- CatalinaLogger.REALM_LOGGER.debug(" Allow access to username/password submission");
- return (true);
- }
- }
-
// Which user principal have we already authenticated?
Principal principal = request.getPrincipal();
boolean status = false;
Added: trunk/src/main/java/org/apache/catalina/util/ConcurrentMessageDigest.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/util/ConcurrentMessageDigest.java (rev 0)
+++ trunk/src/main/java/org/apache/catalina/util/ConcurrentMessageDigest.java 2012-08-28 13:22:31 UTC (rev 2070)
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.catalina.util;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Queue;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+/**
+ * A thread safe wrapper around {@link MessageDigest} that does not make use
+ * of ThreadLocal and - broadly - only creates enough MessageDigest objects
+ * to satisfy the concurrency requirements.
+ */
+public class ConcurrentMessageDigest {
+
+ private static final String MD5 = "MD5";
+
+ private static final Map<String,Queue<MessageDigest>> queues =
+ new HashMap<>();
+
+
+ private ConcurrentMessageDigest() {
+ // Hide default constructor for this utility class
+ }
+
+ static {
+ try {
+ // Init commonly used algorithms
+ init(MD5);
+ } catch (NoSuchAlgorithmException e) {
+ throw new IllegalArgumentException(e);
+ }
+ }
+
+ public static byte[] digestMD5(byte[] input) {
+ return digest(MD5, input);
+ }
+
+ public static byte[] digest(String algorithm, byte[] input) {
+
+ Queue<MessageDigest> queue = queues.get(algorithm);
+ if (queue == null) {
+ throw new IllegalStateException("Must call init() first");
+ }
+
+ MessageDigest md = queue.poll();
+ if (md == null) {
+ try {
+ md = MessageDigest.getInstance(algorithm);
+ } catch (NoSuchAlgorithmException e) {
+ // Ignore. Impossible if init() has been successfully called
+ // first.
+ throw new IllegalStateException("Must call init() first");
+ }
+ }
+
+ byte[] result = md.digest(input);
+
+ queue.add(md);
+
+ return result;
+ }
+
+
+ /**
+ * Ensures that {@link #digest(String, byte[])} and
+ * {@link #digestAsHex(String, byte[])} will support the specified
+ * algorithm. This method <b>must</b> be called and return successfully
+ * before using {@link #digest(String, byte[])} or
+ * {@link #digestAsHex(String, byte[])}.
+ *
+ * @param algorithm The message digest algorithm to be supported
+ *
+ * @throws NoSuchAlgorithmException If the algorithm is not supported by the
+ * JVM
+ */
+ public static void init(String algorithm) throws NoSuchAlgorithmException {
+ synchronized (queues) {
+ if (!queues.containsKey(algorithm)) {
+ MessageDigest md = MessageDigest.getInstance(algorithm);
+ Queue<MessageDigest> queue = new ConcurrentLinkedQueue<>();
+ queue.add(md);
+ queues.put(algorithm, queue);
+ }
+ }
+ }
+}
Modified: trunk/src/main/java/org/apache/catalina/util/MD5Encoder.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/util/MD5Encoder.java 2012-08-28 10:41:30 UTC (rev 2069)
+++ trunk/src/main/java/org/apache/catalina/util/MD5Encoder.java 2012-08-28 13:22:31 UTC (rev 2070)
@@ -50,7 +50,7 @@
* @param binaryData Array containing the digest
* @return Encoded MD5, or null if encoding failed
*/
- public String encode( byte[] binaryData ) {
+ public static String encode( byte[] binaryData ) {
if (binaryData.length != 16)
return null;
12 years, 4 months
JBossWeb SVN: r2069 - in trunk/src/main/java/org: jboss/web and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-08-28 06:41:30 -0400 (Tue, 28 Aug 2012)
New Revision: 2069
Removed:
trunk/src/main/java/org/apache/catalina/valves/LocalStrings.properties
trunk/src/main/java/org/apache/catalina/valves/LocalStrings_es.properties
trunk/src/main/java/org/apache/catalina/valves/LocalStrings_fr.properties
trunk/src/main/java/org/apache/catalina/valves/LocalStrings_ja.properties
Modified:
trunk/src/main/java/org/apache/catalina/valves/ErrorReportValve.java
trunk/src/main/java/org/jboss/web/CatalinaMessages.java
Log:
Update HTTP messages.
Modified: trunk/src/main/java/org/apache/catalina/valves/ErrorReportValve.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/valves/ErrorReportValve.java 2012-08-27 15:04:39 UTC (rev 2068)
+++ trunk/src/main/java/org/apache/catalina/valves/ErrorReportValve.java 2012-08-28 10:41:30 UTC (rev 2069)
@@ -23,6 +23,7 @@
import java.io.IOException;
import java.io.Writer;
+import java.util.Scanner;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
@@ -153,39 +154,57 @@
return;
String message = RequestUtil.filter(response.getMessage());
- if (message == null)
- message = "";
+ if (message == null) {
+ if (throwable != null) {
+ String exceptionMessage = throwable.getMessage();
+ if (exceptionMessage != null && exceptionMessage.length() > 0) {
+ message = RequestUtil.filter((new Scanner(exceptionMessage)).nextLine());
+ }
+ }
+ if (message == null) {
+ message = "";
+ }
+ }
// Do nothing if there is no report for the specified status code
String report = null;
switch (statusCode) {
- case 404: report = MESSAGES.http404(message); break;
- case 500: report = MESSAGES.http500(message); break;
- case 400: report = MESSAGES.http400(message); break;
- case 401: report = MESSAGES.http401(message); break;
- case 402: report = MESSAGES.http402(message); break;
- case 403: report = MESSAGES.http403(message); break;
- case 405: report = MESSAGES.http405(message); break;
- case 406: report = MESSAGES.http406(message); break;
- case 407: report = MESSAGES.http407(message); break;
- case 408: report = MESSAGES.http408(message); break;
- case 409: report = MESSAGES.http409(message); break;
- case 410: report = MESSAGES.http410(message); break;
- case 411: report = MESSAGES.http411(message); break;
- case 412: report = MESSAGES.http412(message); break;
- case 413: report = MESSAGES.http413(message); break;
- case 414: report = MESSAGES.http414(message); break;
- case 415: report = MESSAGES.http415(message); break;
- case 416: report = MESSAGES.http416(message); break;
- case 417: report = MESSAGES.http417(message); break;
- case 422: report = MESSAGES.http422(message); break;
- case 423: report = MESSAGES.http423(message); break;
- case 501: report = MESSAGES.http501(message); break;
- case 502: report = MESSAGES.http502(message); break;
- case 503: report = MESSAGES.http503(message); break;
- case 504: report = MESSAGES.http504(message); break;
- case 505: report = MESSAGES.http505(message); break;
- case 507: report = MESSAGES.http507(message); break;
+ case 404: report = MESSAGES.http404(); break;
+ case 500: report = MESSAGES.http500(); break;
+ case 400: report = MESSAGES.http400(); break;
+ case 403: report = MESSAGES.http403(); break;
+ case 401: report = MESSAGES.http401(); break;
+ case 402: report = MESSAGES.http402(); break;
+ case 405: report = MESSAGES.http405(); break;
+ case 406: report = MESSAGES.http406(); break;
+ case 407: report = MESSAGES.http407(); break;
+ case 408: report = MESSAGES.http408(); break;
+ case 409: report = MESSAGES.http409(); break;
+ case 410: report = MESSAGES.http410(); break;
+ case 411: report = MESSAGES.http411(); break;
+ case 412: report = MESSAGES.http412(); break;
+ case 413: report = MESSAGES.http413(); break;
+ case 414: report = MESSAGES.http414(); break;
+ case 415: report = MESSAGES.http415(); break;
+ case 416: report = MESSAGES.http416(); break;
+ case 417: report = MESSAGES.http417(); break;
+ case 422: report = MESSAGES.http422(); break;
+ case 423: report = MESSAGES.http423(); break;
+ case 424: report = MESSAGES.http424(); break;
+ case 426: report = MESSAGES.http426(); break;
+ case 428: report = MESSAGES.http428(); break;
+ case 429: report = MESSAGES.http429(); break;
+ case 431: report = MESSAGES.http431(); break;
+ case 501: report = MESSAGES.http501(); break;
+ case 502: report = MESSAGES.http502(); break;
+ case 503: report = MESSAGES.http503(); break;
+ case 504: report = MESSAGES.http504(); break;
+ case 505: report = MESSAGES.http505(); break;
+ case 506: report = MESSAGES.http506(); break;
+ case 507: report = MESSAGES.http507(); break;
+ case 508: report = MESSAGES.http508(); break;
+ case 510: report = MESSAGES.http510(); break;
+ case 511: report = MESSAGES.http511(); break;
default:
return;
}
Deleted: trunk/src/main/java/org/apache/catalina/valves/LocalStrings.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/valves/LocalStrings.properties 2012-08-27 15:04:39 UTC (rev 2068)
+++ trunk/src/main/java/org/apache/catalina/valves/LocalStrings.properties 2012-08-28 10:41:30 UTC (rev 2069)
@@ -1,78 +0,0 @@
-accessLogValve.alreadyStarted=Access Logger has already been started
-accessLogValve.notStarted=Access Logger has not yet been started
-semaphoreValve.alreadyStarted=Semaphore valve has already been started
-semaphoreValve.notStarted=Semaphore valve has not yet been started
-certificatesValve.alreadyStarted=Certificates Valve has already been started
-certificatesValve.notStarted=Certificates Valve has not yet been started
-interceptorValve.alreadyStarted=Interceptor Valve has already been started
-interceptorValve.notStarted=Interceptor Valve has not yet been started
-requestFilterValve.next=No ''next'' valve has been configured
-requestFilterValve.syntax=Syntax error in request filter pattern {0}
-valveBase.noNext=Configuration error: No ''next'' valve configured
-jdbcAccessLogValve.exception=Exception performing insert access entry
-jdbcAccessLogValve.close=Exception closing database connection
-cometConnectionManagerValve.event=Exception processing event
-cometConnectionManagerValve.listenerEvent=Exception processing session listener event
-
-# Error report valve
-errorReportValve.errorReport=Error report
-errorReportValve.statusHeader=HTTP Status {0} - {1}
-errorReportValve.exceptionReport=Exception report
-errorReportValve.statusReport=Status report
-errorReportValve.message=message
-errorReportValve.description=description
-errorReportValve.exception=exception
-errorReportValve.rootCause=root cause
-errorReportValve.note=note
-errorReportValve.rootCauseInLogs=The full stack trace of the root cause is available in the {0} logs.
-
-# Remote IP valve
-remoteIpValve.syntax=Invalid regular expressions [{0}] provided.
-
-# SSL valve
-sslValve.certError=Failed to process certificate string [{0}] to create a java.security.cert.X509Certificate object
-sslValve.invalidProvider=The SSL provider specified on the connector associated with this request of [{0}] is invalid. The certificate data could not be processed.
-
-# HTTP status reports
-http.100=The client may continue ({0}).
-http.101=The server is switching protocols according to the "Upgrade" header ({0}).
-http.201=The request succeeded and a new resource ({0}) has been created on the server.
-http.202=This request was accepted for processing, but has not been completed ({0}).
-http.203=The meta information presented by the client did not originate from the server ({0}).
-http.204=The request succeeded but there is no information to return ({0}).
-http.205=The client should reset the document view which caused this request to be sent ({0}).
-http.206=The server has fulfilled a partial GET request for this resource ({0}).
-http.207=Multiple status values have been returned ({0}).
-http.300=The requested resource ({0}) corresponds to any one of a set of representations, each with its own specific location.
-http.301=The requested resource ({0}) has moved permanently to a new location.
-http.302=The requested resource ({0}) has moved temporarily to a new location.
-http.303=The response to this request can be found under a different URI ({0}).
-http.304=The requested resource ({0}) is available and has not been modified.
-http.305=The requested resource ({0}) must be accessed through the proxy given by the "Location" header.
-http.400=The request sent by the client was syntactically incorrect ({0}).
-http.401=This request requires HTTP authentication ({0}).
-http.402=Payment is required for access to this resource ({0}).
-http.403=Access to the specified resource ({0}) has been forbidden.
-http.404=The requested resource ({0}) is not available.
-http.405=The specified HTTP method is not allowed for the requested resource ({0}).
-http.406=The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers ({0}).
-http.407=The client must first authenticate itself with the proxy ({0}).
-http.408=The client did not produce a request within the time that the server was prepared to wait ({0}).
-http.409=The request could not be completed due to a conflict with the current state of the resource ({0}).
-http.410=The requested resource ({0}) is no longer available, and no forwarding address is known.
-http.411=This request cannot be handled without a defined content length ({0}).
-http.412=A specified precondition has failed for this request ({0}).
-http.413=The request entity is larger than the server is willing or able to process.
-http.414=The server refused this request because the request URI was too long ({0}).
-http.415=The server refused this request because the request entity is in a format not supported by the requested resource for the requested method ({0}).
-http.416=The requested byte range cannot be satisfied ({0}).
-http.417=The expectation given in the "Expect" request header ({0}) could not be fulfilled.
-http.422=The server understood the content type and syntax of the request but was unable to process the contained instructions ({0}).
-http.423=The source or destination resource of a method is locked ({0}).
-http.500=The server encountered an internal error ({0}) that prevented it from fulfilling this request.
-http.501=The server does not support the functionality needed to fulfill this request ({0}).
-http.502=This server received an invalid response from a server it consulted when acting as a proxy or gateway ({0}).
-http.503=The requested service ({0}) is not currently available.
-http.504=The server received a timeout from an upstream server while acting as a gateway or proxy ({0}).
-http.505=The server does not support the requested HTTP protocol version ({0}).
-http.507=The resource does not have sufficient space to record the state of the resource after execution of this method ({0}).
Deleted: trunk/src/main/java/org/apache/catalina/valves/LocalStrings_es.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/valves/LocalStrings_es.properties 2012-08-27 15:04:39 UTC (rev 2068)
+++ trunk/src/main/java/org/apache/catalina/valves/LocalStrings_es.properties 2012-08-28 10:41:30 UTC (rev 2069)
@@ -1,83 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-accessLogValve.alreadyStarted = El Registrador de accesos ya se hab\u00EDa iniciado
-accessLogValve.notStarted = El Registrador de accesos no se ha iniciado
-semaphoreValve.alreadyStarted = La v\u00E1lvula del sem\u00E1foro ya ha sido arrancada
-semaphoreValve.notStarted = La v\u00E1lvula del sem\u00E1foro a\u00FAn no ha sido arrancada
-certificatesValve.alreadyStarted = La v\u00E1lvula de certificados ya se hab\u00EDa iniciado
-certificatesValve.notStarted = La v\u00E1lvula de certificados no se ha iniciado
-interceptorValve.alreadyStarted = La v\u00E1lvula interceptora ya se hab\u00EDa iniciado
-interceptorValve.notStarted = La v\u00E1lvula interceptora no se ha iniciado
-requestFilterValve.next = No hay ''siguiente'' v\u00E1lvula configurada
-requestFilterValve.syntax = Error de sint\u00E1xis en petici\u00F3n de filtro patr\u00F3n {0}
-valveBase.noNext = Error de configuraci\u00F3n\: No hay ''siguiente'' v\u00E1lvula configurada
-jdbcAccessLogValve.exception = Excepci\u00F3n realizando entrada de acceso a inserci\u00F3n
-jdbcAccessLogValve.close = Excepci\u00F3n cerrando conexi\u00F3n a base de datos
-cometConnectionManagerValve.event = Excepci\u00F3n procesando evento
-cometConnectionManagerValve.listenerEvent = Excepci\u00F3n procesando evento de oyente de sesi\u00F3n
-# Error report valve
-errorReportValve.errorReport = Informe de Error
-errorReportValve.statusHeader = Estado HTTP {0} - {1}
-errorReportValve.exceptionReport = Informe de Excepci\u00F3n
-errorReportValve.statusReport = Informe de estado
-errorReportValve.message = mensaje
-errorReportValve.description = descripci\u00F3n
-errorReportValve.exception = excepci\u00F3n
-errorReportValve.rootCause = causa ra\u00EDz
-errorReportValve.note = nota
-errorReportValve.rootCauseInLogs = La traza completa de la causa de este error se encuentra en los archivos de diario de {0}.
-# HTTP status reports
-http.100 = El cliente puede continuar ({0}).
-http.101 = El servidor est\u00E1 conmutando protocolos con arreglo a la cabecera "Upgrade" ({0}).
-http.201 = El requerimiento tuvo \u00E9xito y un nuevo recurso ({0}) ha sido creado en el servidor.
-http.202 = Este requerimiento ha sido aceptado para ser procesado, pero no ha sido completado ({0}).
-http.203 = La informaci\u00F3n meta presentada por el cliente no se origin\u00F3 desde el servidor ({0}).
-http.204 = El requerimiento tuvo \u00E9xito pero no hay informaci\u00F3n que devolver ({0}).
-http.205 = El cliente no deber\u00EDa de limpiar la vista del documento que caus\u00F3 que este requerimiento fuera enviado ({0}).
-http.206 = El servidor ha rellenado paci\u00E1lmente un requerimiento GET para este recurso ({0}).
-http.207 = Se han devuelto valores m\u00FAltiples de estado ({0}).
-http.300 = El recurso requerido ({0}) corresponde a una cualquiera de un conjunto de representaciones, cada una con su propia localizaci\u00F3n espec\u00EDfica.
-http.301 = El recurso requerido ({0}) ha sido movido perman\u00E9ntemente a una nueva localizaci\u00F3n.
-http.302 = El recurso requerido ({0}) ha sido movido tempor\u00E1lmente a una nueva localizaci\u00F3n.
-http.303 = La respuesta a este requerimiento se puede hallar bajo una URI diferente ({0}).
-http.304 = El recurso requerido ({0}) est\u00E1 disponible y no ha sido modificado.
-http.305 = El recurso requerido ({0}) debe de ser accedido a trav\u00E9s del apoderado (proxy) dado mediante la cabecera "Location".
-http.400 = El requerimiento enviado por el cliente era sint\u00E1cticamente incorrecto ({0}).
-http.401 = Este requerimiento requiere autenticaci\u00F3n HTTP ({0}).
-http.402 = Se requiere pago para acceder a este recurso ({0}).
-http.403 = El acceso al recurso especificado ({0}) ha sido prohibido.
-http.404 = El recurso requerido ({0}) no est\u00E1 disponible.
-http.405 = El m\u00E9todo HTTP especificado no est\u00E1 permitido para el recurso requerido ({0}).
-http.406 = El recurso identificado por este requerimiento s\u00F3lo es capaz de generar respuestas con caracter\u00EDsticas no aceptables con arreglo a las cabeceras "accept" de requerimiento ({0}).
-http.407 = El cliente debe de ser primero autenticado en el apoderado ({0}).
-http.408 = El cliente no produjo un requerimiento dentro del tiempo en que el servidor estaba preparado esperando ({0}).
-http.409 = El requerimiento no pudo ser completado debido a un conflicto con el estado actual del recurso ({0}).
-http.410 = El recurso requerido ({0}) ya no est\u00E1 disponible y no se conoce direcci\u00F3n de reenv\u00EDo.
-http.411 = Este requerimiento no puede ser manejado sin un tama\u00F1o definido de contenido ({0}).
-http.412 = Una precondici\u00F3n especificada ha fallado para este requerimiento ({0}).
-http.413 = La entidad de requerimiento es mayor de lo que el servidor quiere o puede procesar.
-http.414 = El servidor rechaz\u00F3 este requerimiento porque la URI requerida era demasiado larga ({0}).
-http.415 = El servidor rechaz\u00F3 este requerimiento porque la entidad requerida se encuentra en un formato no soportado por el recurso requerido para el m\u00E9todo requerido ({0}).
-http.416 = El rango de byte requerido no puede ser satisfecho ({0}).
-http.417 = Lo que se espera dado por la cabecera "Expect" de requerimiento ({0}) no pudo ser completado.
-http.422 = El servidor entendi\u00F3 el tipo de contenido y la sint\u00E1xis del requerimiento pero no pudo procesar las instrucciones contenidas ({0}).
-http.423 = La fuente o recurso de destino de un m\u00E9todo est\u00E1 bloqueada ({0}).
-http.500 = El servidor encontr\u00F3 un error interno ({0}) que hizo que no pudiera rellenar este requerimiento.
-http.501 = El servidor no soporta la funcionalidad necesaria para rellenar este requerimiento ({0}).
-http.502 = Este servidor recibi\u00F3 una respuesta inv\u00E1lida desde un servidor que consult\u00F3 cuando actuaba como apoderado o pasarela ({0}).
-http.503 = El servicio requerido ({0}) no est\u00E1 disponible en este momento.
-http.504 = El servidor recibi\u00F3 un Tiempo Agotado desde un servidor superior cuando actuaba como pasarela o apoderado ({0}).
-http.505 = El servidor no soporta la versi\u00F3n de protocolo HTTP requerida ({0}).
-http.507 = El recurso no tiene espacio suficiente para registrar el estado del recurso tras la ejecuci\u00F3n de este m\u00E9todo ({0}).
Deleted: trunk/src/main/java/org/apache/catalina/valves/LocalStrings_fr.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/valves/LocalStrings_fr.properties 2012-08-27 15:04:39 UTC (rev 2068)
+++ trunk/src/main/java/org/apache/catalina/valves/LocalStrings_fr.properties 2012-08-28 10:41:30 UTC (rev 2069)
@@ -1,65 +0,0 @@
-accessLogValve.alreadyStarted=Le traceur d''acc�s a d�j� �t� d�marr�
-accessLogValve.notStarted=Le traceur d''acc�s n''a pas encore �t� d�marr�
-certificatesValve.alreadyStarted=La Valve de Certificats a d�j� �t� d�marr�e
-certificatesValve.notStarted=La Valve de Certificats n''a pas encore �t� d�marr�e
-interceptorValve.alreadyStarted=La Valve d''Interception a d�j� �t� d�marr�
-interceptorValve.notStarted=La Valve d''Interception n''a pas encore �t� d�marr�e
-requestFilterValve.next=Aucune Valve ''suivante'' n''a �t� configur�e
-requestFilterValve.syntax=Erreur de synthaxe dans le pattern de filtre de requ�te {0}
-valveBase.noNext=Erreur de configuration error: Aucune Valve ''suivante'' n''a �t� configur�e
-
-# Error report valve
-errorReportValve.errorReport=Rapport d''erreur
-errorReportValve.statusHeader=Etat HTTP {0} - {1}
-errorReportValve.exceptionReport=Rapport d''exception
-errorReportValve.statusReport=Rapport d''�tat
-errorReportValve.message=message
-errorReportValve.description=description
-errorReportValve.exception=exception
-errorReportValve.rootCause=cause m�re
-errorReportValve.note=note
-errorReportValve.rootCauseInLogs=La trace compl�te de la cause m�re de cette erreur est disponible dans les fichiers journaux de {0}.
-
-# HTTP status reports
-http.100=Le client peut continuer ({0}).
-http.101=Le serveur change de protocoles suivant la directive "Upgrade" de l''ent�te ({0}).
-http.201=La requ�te a r�ussi et une nouvelle ressource ({0}) a �t� cr�ee sur le serveur.
-http.202=La requ�te a �t� accept� pour traitement, mais n''a pas �t� termin�e ({0}).
-http.203=L''information meta pr�sent�e par le client n''a pas pour origine ce server ({0}).
-http.204=La requ�te a r�ussi mais il n''y a aucune information � retourner ({0}).
-http.205=Le client doit remettre � z�ro la vue de document qui a caus�e l''envoi de cette requ�te ({0}).
-http.206=Le serveur a satisfait une requ�te GET partielle pour cette ressource ({0}).
-http.207=Plusieurs valeurs d''�tats ont �t� retourn�es ({0}).
-http.300=La ressource demand�e ({0}) correspond � plusieurs repr�sentations, chacune avec sa propre localisation.
-http.301=La ressource demand�e ({0}) a �t� d�plac�e de fa�on permanente vers une nouvelle localisation.
-http.302=La ressource demand�e ({0}) a �t� d�plac�e de fa�on temporaire vers une nouvelle localisation.
-http.303=La r�ponse � cette requ�te peut �tre trouv�e � une URI diff�rente ({0}).
-http.304=La ressource demand�e ({0}) est disponible et n''a pas �t� modifi�e.
-http.305=La ressource demand�e ({0}) doit �tre acc�d�e au travers du relais indiqu� par la directive "Location" de l''ent�te.
-http.400=La requ�te envoy�e par le client �tait syntaxiquement incorrecte ({0}).
-http.401=La requ�te n�cessite une authentification HTTP ({0}).
-http.402=Un paiement est demand� pour acc�der � cette ressource ({0}).
-http.403=L''acc�s � la ressource demand�e ({0}) a �t� interdit.
-http.404=La ressource demand�e ({0}) n''est pas disponible.
-http.405=La m�thode HTTP sp�cifi�e n''est pas autoris�e pour la ressource demand�e ({0}).
-http.406=La ressource identifi�e par cette requ�te n''est capable de g�n�rer des r�ponses qu''avec des caract�ristiques incompatible avec la directive "accept" pr�sente dans l''ent�te de requ�te ({0}).
-http.407=Le client doit d''abord s''authentifier aupr�s du relais ({0}).
-http.408=Le client n''a pas produit de requ�te pendant le temps d''attente du serveur ({0}).
-http.409=La requ�te ne peut �tre finalis�e suite � un conflit li� � l''�tat de la ressource ({0}).
-http.410=La ressource demand�e ({0}) n''est pas disponible, et aucune addresse de rebond (forwarding) n''est connue.
-http.411=La requ�te ne peut �tre trait�e sans d�finition d''une taille de contenu (content length) ({0}).
-http.412=Une condition pr�alable demand�e a �chou�e pour cette requ�te ({0}).
-http.413=L''entit� de requ�te est plus importante que ce que le serveur veut ou peut traiter.
-http.414=Le serveur a refus� cette requ�te car URI de requ�te est trop longue ({0}).
-http.415=Le serveur a refus� cette requ�te car l''entit� de requ�te est dans un format non support� par la ressource demand�e avec la m�thode sp�cifi�e ({0}).
-http.416=La place d''octets (byte range) ne peut �tre satisfaite ({0}).
-http.417=L''attente indiqu� dans la directive "Expect" de l''ent�te de requ�te ({0}) ne peut �tre satisfaite.
-http.422=Le serveur a compris le type de contenu (content type) ainsi que la synthaxe de la requ�te mais a �t� incapable de traiter les instructions contenues ({0}).
-http.423=La ressource source ou destination de la m�thode est v�rrouill�e ({0}).
-http.500=Le serveur a rencontr� une erreur interne ({0}) qui l''a emp�ch� de satisfaire la requ�te.
-http.501=Le serveur ne supporte pas la fonctionnalit� demand�e pour satisfaire cette requ�te ({0}).
-http.502=Le serveur a re�u une r�ponse invalide d''un serveur qu''il consultait en tant que relais ou passerelle ({0}).
-http.503=Le service demand� ({0}) n''est pas disponible actuellement.
-http.504=Le serveur a re�u un d�passement de delais (timeout) d''un serveur amont qu''il consultait en tant que relais ou passerelle ({0}).
-http.505=Le serveur ne supporte pas la version de protocole HTTP demand� ({0}).
-http.507=La ressource n''a pas assez d''espace pour enregistrer l''�tat de la ressource apr�s ex�cution de cette m�thode ({0}).
Deleted: trunk/src/main/java/org/apache/catalina/valves/LocalStrings_ja.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/valves/LocalStrings_ja.properties 2012-08-27 15:04:39 UTC (rev 2068)
+++ trunk/src/main/java/org/apache/catalina/valves/LocalStrings_ja.properties 2012-08-28 10:41:30 UTC (rev 2069)
@@ -1,22 +0,0 @@
-accessLogValve.alreadyStarted=\u30a2\u30af\u30bb\u30b9\u30ed\u30ac\u30fc\u306f\u65e2\u306b\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u3059
-accessLogValve.notStarted=\u30a2\u30af\u30bb\u30b9\u30ed\u30ac\u30fc\u306f\u307e\u3060\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-certificatesValve.alreadyStarted=\u8a8d\u8a3c\u30d0\u30eb\u30d6\u306f\u65e2\u306b\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u3059
-certificatesValve.notStarted=\u8a8d\u8a3c\u30d0\u30eb\u30d6\u306f\u307e\u3060\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-interceptorValve.alreadyStarted=\u30a4\u30f3\u30bf\u30fc\u30bb\u30d7\u30bf\u30d0\u30eb\u30d6\u306f\u65e2\u306b\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u3059
-interceptorValve.notStarted=\u30a4\u30f3\u30bf\u30fc\u30bb\u30d7\u30bf\u30d0\u30eb\u30d6\u306f\u307e\u3060\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-requestFilterValve.next=\u6b21\u306e\u30d0\u30eb\u30d6\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-requestFilterValve.syntax=\u30ea\u30af\u30a8\u30b9\u30c8\u30d5\u30a3\u30eb\u30bf\u30d1\u30bf\u30fc\u30f3 {0} \u306b\u69cb\u6587\u30a8\u30e9\u30fc\u304c\u3042\u308a\u307e\u3059
-jdbcAccessLogValve.exception=\u30a2\u30af\u30bb\u30b9\u30a8\u30f3\u30c8\u30ea\u306e\u633f\u5165\u3092\u5b9f\u884c\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-jdbcAccessLogValve.close=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u63a5\u7d9a\u3092\u30af\u30ed\u30fc\u30ba\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-
-# Error report valve
-valveBase.noNext=\u8a2d\u5b9a\u30a8\u30e9\u30fc: \u6b21\u306e\u30d0\u30eb\u30d6\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-errorReportValve.statusHeader=HTTP\u30b9\u30c6\u30fc\u30bf\u30b9 {0} - {1}
-errorReportValve.exceptionReport=\u4f8b\u5916\u30ec\u30dd\u30fc\u30c8
-errorReportValve.statusReport=\u30b9\u30c6\u30fc\u30bf\u30b9\u30ec\u30dd\u30fc\u30c8
-errorReportValve.message=\u30e1\u30c3\u30bb\u30fc\u30b8
-errorReportValve.description=\u8aac\u660e
-errorReportValve.exception=\u4f8b\u5916
-errorReportValve.rootCause=\u539f\u56e0
-errorReportValve.note=\u6ce8\u610f
-errorReportValve.rootCauseInLogs=\u539f\u56e0\u306e\u3059\u3079\u3066\u306e\u30b9\u30bf\u30c3\u30af\u30c8\u30ec\u30fc\u30b9\u306f\u3001{0}\u306e\u30ed\u30b0\u306b\u8a18\u9332\u3055\u308c\u3066\u3044\u307e\u3059
Modified: trunk/src/main/java/org/jboss/web/CatalinaMessages.java
===================================================================
--- trunk/src/main/java/org/jboss/web/CatalinaMessages.java 2012-08-27 15:04:39 UTC (rev 2068)
+++ trunk/src/main/java/org/jboss/web/CatalinaMessages.java 2012-08-28 10:41:30 UTC (rev 2069)
@@ -108,175 +108,217 @@
@Message(id = 21, value = "Missing MD5 digest")
IllegalArgumentException noMD5Digest(@Cause NoSuchAlgorithmException e);
- @Message(id = 22, value = "The client may continue (%s).")
- String http100(String resource);
+ @Message(id = 64, value = "Error report")
+ String errorReport();
- @Message(id = 23, value = "The server is switching protocols according to the 'Upgrade' header (%s).")
- String http101(String resource);
+ @Message(id = 65, value = "HTTP Status %s - %s")
+ String statusHeader(int statusCode, String message);
- @Message(id = 24, value = "The request succeeded and a new resource (%s) has been created on the server.")
- String http201(String resource);
+ @Message(id = 66, value = "Exception report")
+ String exceptionReport();
- @Message(id = 25, value = "This request was accepted for processing, but has not been completed (%s).")
- String http202(String resource);
+ @Message(id = 67, value = "Status report")
+ String statusReport();
- @Message(id = 26, value = "The meta information presented by the client did not originate from the server (%s).")
- String http203(String resource);
+ @Message(id = 68, value = "message")
+ String statusMessage();
- @Message(id = 27, value = "The request succeeded but there is no information to return (%s).")
- String http204(String resource);
+ @Message(id = 69, value = "description")
+ String statusDescritpion();
- @Message(id = 28, value = "The client should reset the document view which caused this request to be sent (%s).")
- String http205(String resource);
+ @Message(id = 70, value = "exception")
+ String statusException();
- @Message(id = 29, value = "The server has fulfilled a partial GET request for this resource (%s).")
- String http206(String resource);
+ @Message(id = 71, value = "root cause")
+ String statusRootCause();
- @Message(id = 30, value = "Multiple status values have been returned (%s).")
- String http207(String resource);
+ @Message(id = 72, value = "note")
+ String statusNote();
- @Message(id = 31, value = "The requested resource (%s) corresponds to any one of a set of representations, each with its own specific location.")
- String http300(String resource);
+ @Message(id = 73, value = "The full stack trace of the root cause is available in the %s logs.")
+ String statusRootCauseInLogs(String log);
- @Message(id = 32, value = "The requested resource (%s) has moved permanently to a new location.")
- String http301(String resource);
+ @Message(id = 74, value = "Exception processing event.")
+ String eventValveExceptionDuringEvent();
- @Message(id = 33, value = "The requested resource (%s) has moved temporarily to a new location.")
- String http302(String resource);
+ @Message(id = 75, value = "Exception processing session listener event.")
+ String eventValveSessionListenerException();
- @Message(id = 34, value = "The response to this request can be found under a different URI (%s).")
- String http303(String resource);
+ @Message(id = 76, value = "Exception performing insert access entry.")
+ String jdbcAccessLogValveInsertError();
- @Message(id = 35, value = "The requested resource (%s) is available and has not been modified.")
- String http304(String resource);
+ @Message(id = 77, value = "Exception closing database connection.")
+ String jdbcAccessLogValveConnectionCloseError();
- @Message(id = 36, value = "The requested resource (%s) must be accessed through the proxy given by the 'Location' header.")
- String http305(String resource);
+ @Message(id = 78, value = "Syntax error in request filter pattern %s")
+ String requestFilterValvePatternError(String pattern);
- @Message(id = 37, value = "The request sent by the client was syntactically incorrect (%s).")
- String http400(String resource);
+ @Message(id = 100, value = "The client may continue.")
+ String http100();
- @Message(id = 38, value = "This request requires HTTP authentication (%s).")
- String http401(String resource);
+ @Message(id = 101, value = "The server is switching protocols according to the 'Upgrade' header.")
+ String http101();
- @Message(id = 39, value = "Payment is required for access to this resource (%s).")
- String http402(String resource);
+ @Message(id = 102, value = "The server has accepted the complete request, but has not yet completed it.")
+ String http102();
- @Message(id = 40, value = "Access to the specified resource (%s) has been forbidden.")
- String http403(String resource);
+ @Message(id = 103, value = "The request succeeded and a new resource has been created on the server.")
+ String http201();
- @Message(id = 41, value = "The requested resource (%s) is not available.")
- String http404(String resource);
+ @Message(id = 104, value = "This request was accepted for processing, but has not been completed.")
+ String http202();
- @Message(id = 42, value = "The specified HTTP method is not allowed for the requested resource (%s).")
- String http405(String resource);
+ @Message(id = 105, value = "The meta information presented by the client did not originate from the server.")
+ String http203();
- @Message(id = 43, value = "The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request 'Accept' headers (%s).")
- String http406(String resource);
+ @Message(id = 106, value = "The request succeeded but there is no information to return.")
+ String http204();
- @Message(id = 44, value = "The client must first authenticate itself with the proxy (%s).")
- String http407(String resource);
+ @Message(id = 107, value = "The client should reset the document view which caused this request to be sent.")
+ String http205();
- @Message(id = 45, value = "The client did not produce a request within the time that the server was prepared to wait (%s).")
- String http408(String resource);
+ @Message(id = 108, value = "The server has fulfilled a partial GET request for this resource.")
+ String http206();
- @Message(id = 46, value = "The request could not be completed due to a conflict with the current state of the resource (%s).")
- String http409(String resource);
+ @Message(id = 109, value = "Multiple status values have been returned.")
+ String http207();
- @Message(id = 47, value = "The requested resource (%s) is no longer available, and no forwarding address is known.")
- String http410(String resource);
+ @Message(id = 110, value = "This collection binding was already reported.")
+ String http208();
- @Message(id = 48, value = "This request cannot be handled without a defined content length (%s).")
- String http411(String resource);
+ @Message(id = 111, value = "The response is a representation of the result of one or more instance-manipulations applied to the current instance.")
+ String http226();
- @Message(id = 49, value = "A specified precondition has failed for this request (%s).")
- String http412(String resource);
+ @Message(id = 112, value = "The requested resource corresponds to any one of a set of representations, each with its own specific location.")
+ String http300();
- @Message(id = 50, value = "The request entity is larger than the server is willing or able to process (%s).")
- String http413(String resource);
+ @Message(id = 113, value = "The requested resource has moved permanently to a new location.")
+ String http301();
- @Message(id = 51, value = "The server refused this request because the request URI was too long (%s).")
- String http414(String resource);
+ @Message(id = 114, value = "The requested resource has moved temporarily to a new location.")
+ String http302();
- @Message(id = 52, value = "The server refused this request because the request entity is in a format not supported by the requested resource for the requested method (%s).")
- String http415(String resource);
+ @Message(id = 115, value = "The response to this request can be found under a different URI (%s).")
+ String http303();
- @Message(id = 53, value = "The requested byte range cannot be satisfied (%s).")
- String http416(String resource);
+ @Message(id = 116, value = "The requested resource is available and has not been modified.")
+ String http304();
- @Message(id = 54, value = "The expectation given in the 'Expect' request header (%s) could not be fulfilled.")
- String http417(String resource);
+ @Message(id = 117, value = "The requested resource must be accessed through the proxy given by the 'Location' header.")
+ String http305();
- @Message(id = 55, value = "The server understood the content type and syntax of the request but was unable to process the contained instructions (%s).")
- String http422(String resource);
+ @Message(id = 118, value = "The requested resource resides temporarily under a different URI.")
+ String http307();
- @Message(id = 56, value = "The source or destination resource of a method is locked (%s).")
- String http423(String resource);
+ @Message(id = 119, value = "The target resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs.")
+ String http308();
- @Message(id = 57, value = "The server encountered an internal error (%s) that prevented it from fulfilling this request.")
- String http500(String resource);
+ @Message(id = 120, value = "The request sent by the client was syntactically incorrect.")
+ String http400();
- @Message(id = 58, value = "The server does not support the functionality needed to fulfill this request (%s).")
- String http501(String resource);
+ @Message(id = 121, value = "This request requires HTTP authentication.")
+ String http401();
- @Message(id = 59, value = "This server received an invalid response from a server it consulted when acting as a proxy or gateway (%s).")
- String http502(String resource);
+ @Message(id = 122, value = "Payment is required for access to this resource.")
+ String http402();
- @Message(id = 60, value = "The requested service (%s) is not currently available.")
- String http503(String resource);
+ @Message(id = 123, value = "Access to the specified resource has been forbidden.")
+ String http403();
- @Message(id = 61, value = "The server received a timeout from an upstream server while acting as a gateway or proxy (%s).")
- String http504(String resource);
+ @Message(id = 124, value = "The requested resource is not available.")
+ String http404();
- @Message(id = 62, value = "The server does not support the requested HTTP protocol version (%s).")
- String http505(String resource);
+ @Message(id = 125, value = "The specified HTTP method is not allowed for the requested resource.")
+ String http405();
- @Message(id = 63, value = "The resource does not have sufficient space to record the state of the resource after execution of this method (%s).")
- String http507(String resource);
+ @Message(id = 126, value = "The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request 'Accept' headers.")
+ String http406();
- @Message(id = 64, value = "Error report")
- String errorReport();
+ @Message(id = 127, value = "The client must first authenticate itself with the proxy.")
+ String http407();
- @Message(id = 65, value = "HTTP Status %s - %s")
- String statusHeader(int statusCode, String message);
+ @Message(id = 128, value = "The client did not produce a request within the time that the server was prepared to wait.")
+ String http408();
- @Message(id = 66, value = "Exception report")
- String exceptionReport();
+ @Message(id = 129, value = "The request could not be completed due to a conflict with the current state of the resource.")
+ String http409();
- @Message(id = 67, value = "Status report")
- String statusReport();
+ @Message(id = 130, value = "The requested resource is no longer available, and no forwarding address is known.")
+ String http410();
- @Message(id = 68, value = "message")
- String statusMessage();
+ @Message(id = 131, value = "This request cannot be handled without a defined content length.")
+ String http411();
- @Message(id = 69, value = "description")
- String statusDescritpion();
+ @Message(id = 132, value = "A specified precondition has failed for this request.")
+ String http412();
- @Message(id = 70, value = "exception")
- String statusException();
+ @Message(id = 133, value = "The request entity is larger than the server is willing or able to process.")
+ String http413();
- @Message(id = 71, value = "root cause")
- String statusRootCause();
+ @Message(id = 134, value = "The server refused this request because the request URI was too long.")
+ String http414();
- @Message(id = 72, value = "note")
- String statusNote();
+ @Message(id = 135, value = "The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.")
+ String http415();
- @Message(id = 73, value = "The full stack trace of the root cause is available in the %s logs.")
- String statusRootCauseInLogs(String log);
+ @Message(id = 136, value = "The requested byte range cannot be satisfied.")
+ String http416();
- @Message(id = 74, value = "Exception processing event.")
- String eventValveExceptionDuringEvent();
+ @Message(id = 137, value = "The expectation given in the 'Expect' request header could not be fulfilled.")
+ String http417();
- @Message(id = 75, value = "Exception processing session listener event.")
- String eventValveSessionListenerException();
+ @Message(id = 138, value = "The server understood the content type and syntax of the request but was unable to process the contained instructions.")
+ String http422();
- @Message(id = 76, value = "Exception performing insert access entry.")
- String jdbcAccessLogValveInsertError();
+ @Message(id = 139, value = "The source or destination resource of a method is locked.")
+ String http423();
- @Message(id = 77, value = "Exception closing database connection.")
- String jdbcAccessLogValveConnectionCloseError();
+ @Message(id = 140, value = "The method could not be performed on the resource because the requested action depended on another action and that action failed.")
+ String http424();
- @Message(id = 78, value = "Syntax error in request filter pattern %s")
- String requestFilterValvePatternError(String pattern);
+ @Message(id = 141, value = "The request can only be completed after a protocol upgrade.")
+ String http426();
+ @Message(id = 142, value = "The request is required to be conditional.")
+ String http428();
+
+ @Message(id = 143, value = "The user has sent too many requests in a given amount of time.")
+ String http429();
+
+ @Message(id = 144, value = "The server refused this request because the request header fields are too large.")
+ String http431();
+
+ @Message(id = 145, value = "The server encountered an internal error that prevented it from fulfilling this request.")
+ String http500();
+
+ @Message(id = 146, value = "The server does not support the functionality needed to fulfill this request.")
+ String http501();
+
+ @Message(id = 147, value = "This server received an invalid response from a server it consulted when acting as a proxy or gateway.")
+ String http502();
+
+ @Message(id = 148, value = "The requested service is not currently available.")
+ String http503();
+
+ @Message(id = 149, value = "The server received a timeout from an upstream server while acting as a gateway or proxy.")
+ String http504();
+
+ @Message(id = 150, value = "The server does not support the requested HTTP protocol version.")
+ String http505();
+
+ @Message(id = 151, value = "The chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.")
+ String http506();
+
+ @Message(id = 152, value = "The resource does not have sufficient space to record the state of the resource after execution of this method.")
+ String http507();
+
+ @Message(id = 153, value = "The server terminated an operation because it encountered an infinite loop.")
+ String http508();
+
+ @Message(id = 154, value = "The policy for accessing the resource has not been met in the request.")
+ String http510();
+
+ @Message(id = 155, value = "The client needs to authenticate to gain network access.")
+ String http511();
+
}
12 years, 4 months
JBossWeb SVN: r2068 - in trunk/src/main: java/org/apache/catalina/authenticator and 11 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-08-27 11:04:39 -0400 (Mon, 27 Aug 2012)
New Revision: 2068
Added:
trunk/src/main/resources/
trunk/src/main/resources/org/
trunk/src/main/resources/org/apache/
trunk/src/main/resources/org/apache/catalina/
trunk/src/main/resources/org/apache/catalina/util/
trunk/src/main/resources/org/apache/catalina/util/CharsetMapperDefault.properties
trunk/src/main/resources/org/apache/tomcat/
trunk/src/main/resources/org/apache/tomcat/util/
trunk/src/main/resources/org/apache/tomcat/util/http/
trunk/src/main/resources/org/apache/tomcat/util/http/HttpMessages.properties
Removed:
trunk/src/main/java/org/apache/catalina/authenticator/LocalStrings.properties
trunk/src/main/java/org/apache/catalina/authenticator/LocalStrings_es.properties
trunk/src/main/java/org/apache/catalina/authenticator/LocalStrings_fr.properties
trunk/src/main/java/org/apache/catalina/authenticator/LocalStrings_ja.properties
trunk/src/main/java/org/apache/catalina/realm/LocalStrings.properties
trunk/src/main/java/org/apache/catalina/realm/LocalStrings_es.properties
trunk/src/main/java/org/apache/catalina/realm/LocalStrings_fr.properties
trunk/src/main/java/org/apache/catalina/realm/LocalStrings_ja.properties
Modified:
trunk/src/main/java/org/apache/catalina/authenticator/AuthenticatorBase.java
trunk/src/main/java/org/apache/catalina/valves/AccessLogValve.java
trunk/src/main/java/org/apache/catalina/valves/ErrorReportValve.java
trunk/src/main/java/org/apache/catalina/valves/EventOrAsyncConnectionManagerValve.java
trunk/src/main/java/org/apache/catalina/valves/JDBCAccessLogValve.java
trunk/src/main/java/org/apache/catalina/valves/RequestFilterValve.java
trunk/src/main/java/org/apache/catalina/valves/SSLValve.java
trunk/src/main/java/org/apache/catalina/valves/SemaphoreValve.java
trunk/src/main/java/org/jboss/web/CatalinaMessages.java
Log:
- Move on to another package.
- Add some needed properties files I forgot to commit.
Modified: trunk/src/main/java/org/apache/catalina/authenticator/AuthenticatorBase.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/authenticator/AuthenticatorBase.java 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/apache/catalina/authenticator/AuthenticatorBase.java 2012-08-27 15:04:39 UTC (rev 2068)
@@ -50,9 +50,8 @@
import org.apache.catalina.session.ManagerBase;
import org.apache.catalina.util.DateTool;
import org.apache.catalina.util.LifecycleSupport;
-import org.apache.catalina.util.StringManager;
import org.apache.catalina.valves.ValveBase;
-import org.jboss.logging.Logger;
+import org.jboss.web.CatalinaLogger;
/**
@@ -79,7 +78,6 @@
public abstract class AuthenticatorBase
extends ValveBase
implements Authenticator, Lifecycle {
- private static Logger log = Logger.getLogger(AuthenticatorBase.class);
// ----------------------------------------------------- Instance Variables
@@ -301,8 +299,8 @@
// Is there an SSO session against which we can try to reauthenticate?
String ssoId = (String) request.getNote(Constants.REQ_SSOID_NOTE);
if (ssoId != null) {
- if (log.isDebugEnabled())
- log.debug("SSO Id " + ssoId + " set; attempting " +
+ if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled())
+ CatalinaLogger.AUTH_LOGGER.debug("SSO Id " + ssoId + " set; attempting " +
"reauthentication");
/* Try to reauthenticate using data cached by SSO. If this fails,
either the original SSO logon was of DIGEST or SSL (which
@@ -340,8 +338,8 @@
public void invoke(Request request, Response response)
throws IOException, ServletException {
- if (log.isDebugEnabled())
- log.debug("Security checking request " +
+ if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled())
+ CatalinaLogger.AUTH_LOGGER.debug("Security checking request " +
request.getMethod() + " " + request.getRequestURI());
LoginConfig config = this.context.getLoginConfig();
@@ -353,8 +351,8 @@
if (session != null) {
principal = session.getPrincipal();
if (principal != null) {
- if (log.isDebugEnabled())
- log.debug("We have cached auth type " +
+ if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled())
+ CatalinaLogger.AUTH_LOGGER.debug("We have cached auth type " +
session.getAuthType() +
" for principal " +
session.getPrincipal());
@@ -373,8 +371,8 @@
if (requestURI.startsWith(contextPath) &&
requestURI.endsWith(Constants.FORM_ACTION)) {
if (!authenticate(request, response, config)) {
- if (log.isDebugEnabled())
- log.debug(" Failed authenticate() test ??" + requestURI );
+ if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled())
+ CatalinaLogger.AUTH_LOGGER.debug(" Failed authenticate() test ??" + requestURI );
return;
}
}
@@ -386,8 +384,8 @@
if ((constraints == null) /* &&
(!Constants.FORM_METHOD.equals(config.getAuthMethod())) */ ) {
- if (log.isDebugEnabled())
- log.debug(" Not subject to any constraint");
+ if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled())
+ CatalinaLogger.AUTH_LOGGER.debug(" Not subject to any constraint");
getNext().invoke(request, response);
return;
}
@@ -413,13 +411,13 @@
int i;
// Enforce any user data constraint for this security constraint
- if (log.isDebugEnabled()) {
- log.debug(" Calling hasUserDataPermission()");
+ if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled()) {
+ CatalinaLogger.AUTH_LOGGER.debug(" Calling hasUserDataPermission()");
}
if (!realm.hasUserDataPermission(request, response,
constraints)) {
- if (log.isDebugEnabled()) {
- log.debug(" Failed hasUserDataPermission() test");
+ if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled()) {
+ CatalinaLogger.AUTH_LOGGER.debug(" Failed hasUserDataPermission() test");
}
/*
* ASSERT: Authenticator already set the appropriate
@@ -443,12 +441,12 @@
}
if(authRequired) {
- if (log.isDebugEnabled()) {
- log.debug(" Calling authenticate()");
+ if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled()) {
+ CatalinaLogger.AUTH_LOGGER.debug(" Calling authenticate()");
}
if (!authenticate(request, response, config)) {
- if (log.isDebugEnabled()) {
- log.debug(" Failed authenticate() test");
+ if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled()) {
+ CatalinaLogger.AUTH_LOGGER.debug(" Failed authenticate() test");
}
/*
* ASSERT: Authenticator already set the appropriate
@@ -459,14 +457,14 @@
}
}
- if (log.isDebugEnabled()) {
- log.debug(" Calling accessControl()");
+ if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled()) {
+ CatalinaLogger.AUTH_LOGGER.debug(" Calling accessControl()");
}
if (!realm.hasResourcePermission(request, response,
constraints,
this.context)) {
- if (log.isDebugEnabled()) {
- log.debug(" Failed accessControl() test");
+ if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled()) {
+ CatalinaLogger.AUTH_LOGGER.debug(" Failed accessControl() test");
}
/*
* ASSERT: AccessControl method has already set the
@@ -477,8 +475,8 @@
}
// Any and all specified constraints have been satisfied
- if (log.isDebugEnabled()) {
- log.debug(" Successfully passed all security constraints");
+ if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled()) {
+ CatalinaLogger.AUTH_LOGGER.debug(" Successfully passed all security constraints");
}
getNext().invoke(request, response);
@@ -566,8 +564,8 @@
if (reauthenticated) {
associate(ssoId, request.getSessionInternal(true));
- if (log.isDebugEnabled()) {
- log.debug(" Reauthenticated cached principal '" +
+ if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled()) {
+ CatalinaLogger.AUTH_LOGGER.debug(" Reauthenticated cached principal '" +
request.getUserPrincipal().getName() +
"' with auth type '" + request.getAuthType() + "'");
}
@@ -594,8 +592,8 @@
Principal principal, String authType,
String username, String password) {
- if (log.isDebugEnabled())
- log.debug("Authenticated '" + principal.getName() + "' with type '"
+ if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled())
+ CatalinaLogger.AUTH_LOGGER.debug("Authenticated '" + principal.getName() + "' with type '"
+ authType + "'");
// Cache the authentication information in our request
@@ -790,11 +788,11 @@
if (sso == null)
parent = parent.getParent();
}
- if (log.isDebugEnabled()) {
+ if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled()) {
if (sso != null)
- log.debug("Found SingleSignOn Valve at " + sso);
+ CatalinaLogger.AUTH_LOGGER.debug("Found SingleSignOn Valve at " + sso);
else
- log.debug("No SingleSignOn Valve is present");
+ CatalinaLogger.AUTH_LOGGER.debug("No SingleSignOn Valve is present");
}
}
Deleted: trunk/src/main/java/org/apache/catalina/authenticator/LocalStrings.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/authenticator/LocalStrings.properties 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/apache/catalina/authenticator/LocalStrings.properties 2012-08-27 15:04:39 UTC (rev 2068)
@@ -1,19 +0,0 @@
-authenticator.alreadyStarted=Security Interceptor has already been started
-authenticator.certificates=No client certificate chain in this request
-authenticator.forbidden=Access to the requested resource has been denied
-authenticator.formlogin=Invalid direct reference to form login page
-authenticator.invalid=Invalid client certificate chain in this request
-authenticator.keystore=Exception loading key store
-authenticator.manager=Exception initializing trust managers
-authenticator.notAuthenticated=Configuration error: Cannot perform access control without an authenticated principal
-authenticator.notContext=Configuration error: Must be attached to a Context
-authenticator.notStarted=Security Interceptor has not yet been started
-authenticator.requestBodyTooBig=The request body was too large to be cached during the authentication process
-authenticator.sessionExpired=The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser
-authenticator.unauthorized=Cannot authenticate with the provided credentials
-authenticator.userDataConstraint=This request violates a User Data constraint for this application
-
-formAuthenticator.forwardErrorFail=Unexpected error forwarding to error page
-formAuthenticator.forwardLoginFail=Unexpected error forwarding to login page
-
-digestAuthenticator.cacheRemove=A valid entry has been removed from client nonce cache to make room for new entries. A replay attack is now possible. To prevent the possibility of replay attacks, reduce nonceValidity or increase cnonceCacheSize. Further warnings of this type will be suppressed for 5 minutes
Deleted: trunk/src/main/java/org/apache/catalina/authenticator/LocalStrings_es.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/authenticator/LocalStrings_es.properties 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/apache/catalina/authenticator/LocalStrings_es.properties 2012-08-27 15:04:39 UTC (rev 2068)
@@ -1,28 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-authenticator.alreadyStarted = El interceptor de seguridad ya ha sido arrancado
-authenticator.certificates = No hay cadena de certificados del cliente en esta petici\u00F3n
-authenticator.forbidden = El acceso al recurso pedido ha sido denegado
-authenticator.formlogin = Referencia directa al formulario de conexi\u00F3n (p\u00E1gina de formulario de login) inv\u00E1lida
-authenticator.invalid = No es v\u00E1lida la cadena de certificados del cliente en esta petici\u00F3n
-authenticator.keystore = Excepci\u00F3n cargando el almac\u00E9n de claves
-authenticator.manager = Excepci\u00F3n inicializando administradores de confianza
-authenticator.notAuthenticated = Error de Configuraci\u00F3n\: No se pueden realizar funciones de control de acceso sin un principal autenticado
-authenticator.notContext = Error de Configuraci\u00F3n\: Debe de estar unido a un Contexto
-authenticator.notStarted = El Interceptor de seguridad no sido a\u00FAn iniciado
-authenticator.requestBodyTooBig = El cuerpo del requerimiento era demasiado grande para realizar cach\u00E9 durante el proceso de autenticaci\u00F3n
-authenticator.sessionExpired = El tiempo permitido para realizar login ha sido excedido. Si deseas continuar, debes hacer clik dos veces y volver a hacer clik otra vez o cerrar y reabrir tu navegador
-authenticator.unauthorized = Imposible autenticar mediante las credenciales suministradas
-authenticator.userDataConstraint = Esta petici\u00F3n viola una Restrici\u00F3n de Datos de usuario para esta aplicaci\u00F3n
Deleted: trunk/src/main/java/org/apache/catalina/authenticator/LocalStrings_fr.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/authenticator/LocalStrings_fr.properties 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/apache/catalina/authenticator/LocalStrings_fr.properties 2012-08-27 15:04:39 UTC (rev 2068)
@@ -1,12 +0,0 @@
-authenticator.alreadyStarted=L''intercepteur de s�curit� (security interceptor) a d�j� �t� d�marr�
-authenticator.certificates=Aucune cha�ne de certificat client (client certificate chain) dans cette requ�te
-authenticator.forbidden=L''acc�s � la ressource demand�e a �t� interdit
-authenticator.formlogin=R�f�rence directe � la form de connexion (form login page) invalide
-authenticator.invalid=Cha�ne de certificat client invalide dans cette requ�te
-authenticator.keystore=Exception lors du chargement du r�f�rentiel de clefs (key store)
-authenticator.manager=Exception lors de l''initialisation des gestionnaires d''authentification (trust managers)
-authenticator.notAuthenticated=Erreur de configuration: Impossible de proc�der � un contr�le d''acc�s sans un principal authentifi� (authenticated principal)
-authenticator.notContext=Erreur de configuration: Doit �tre attach� � un contexte
-authenticator.notStarted=L''intercepteur de s�curit� (security interceptor) n''a pas encore �t� d�marr�
-authenticator.unauthorized=Impossible d''authentifier avec les cr�dits fournis (provided credentials)
-authenticator.userDataConstraint=Cette requ�te viole une contrainte donn�e utilisateur (user data constraint) pour cette application
Deleted: trunk/src/main/java/org/apache/catalina/authenticator/LocalStrings_ja.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/authenticator/LocalStrings_ja.properties 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/apache/catalina/authenticator/LocalStrings_ja.properties 2012-08-27 15:04:39 UTC (rev 2068)
@@ -1,13 +0,0 @@
-authenticator.alreadyStarted=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30a4\u30f3\u30bf\u30fc\u30bb\u30d7\u30bf\u306f\u65e2\u306b\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u3059
-authenticator.certificates=\u3053\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a8d\u8a3c\u30c1\u30a7\u30fc\u30f3\u304c\u3042\u308a\u307e\u305b\u3093
-authenticator.forbidden=\u30ea\u30af\u30a8\u30b9\u30c8\u3055\u308c\u305f\u30ea\u30bd\u30fc\u30b9\u3078\u306e\u30a2\u30af\u30bb\u30b9\u304c\u62d2\u5426\u3055\u308c\u307e\u3057\u305f
-authenticator.formlogin=\u30d5\u30a9\u30fc\u30e0\u30ed\u30b0\u30a4\u30f3\u30da\u30fc\u30b8\u3078\u306e\u7121\u52b9\u306a\u76f4\u63a5\u53c2\u7167\u3067\u3059
-authenticator.invalid=\u3053\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u7121\u52b9\u306a\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u8a8d\u8a3c\u30c1\u30a7\u30fc\u30f3\u304c\u3042\u308a\u307e\u3059
-authenticator.keystore=\u30ad\u30fc\u30b9\u30c8\u30a2\u3092\u30ed\u30fc\u30c9\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-authenticator.manager=\u30c8\u30e9\u30b9\u30c8\u30de\u30cd\u30fc\u30b8\u30e3\u3092\u521d\u671f\u5316\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-authenticator.notAuthenticated=\u8a2d\u5b9a\u30a8\u30e9\u30fc: \u8a8d\u8a3c\u3055\u308c\u305f\u4e3b\u4f53\u306a\u3057\u306b\u30a2\u30af\u30bb\u30b9\u5236\u5fa1\u3092\u5b9f\u884c\u3067\u304d\u307e\u305b\u3093
-authenticator.notContext=\u8a2d\u5b9a\u30a8\u30e9\u30fc: \u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306b\u6307\u5b9a\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093
-authenticator.notStarted=\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30a4\u30f3\u30bf\u30fc\u30bb\u30d7\u30bf\u306f\u307e\u3060\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-authenticator.sessionExpired=\u30ed\u30b0\u30a4\u30f3\u30d7\u30ed\u30bb\u30b9\u306b\u8a8d\u3081\u3089\u308c\u3066\u3044\u305f\u6642\u9593\u304c\u904e\u304e\u307e\u3057\u305f\u3002\u7d99\u7d9a\u3057\u305f\u3044\u306a\u3089\u3070\uff0c\u30d0\u30c3\u30af\u30dc\u30bf\u30f3\u30922\u5ea6\u62bc\u3057\u3066\u304b\u3089\u518d\u5ea6\u30ea\u30f3\u30af\u3092\u62bc\u3059\u304b\uff0c\u30d6\u30e9\u30a6\u30b6\u3092\u7acb\u3061\u4e0a\u3052\u76f4\u3057\u3066\u304f\u3060\u3055\u3044
-authenticator.unauthorized=\u7528\u610f\u3055\u308c\u305f\u8a3c\u660e\u66f8\u3067\u8a8d\u8a3c\u3067\u304d\u307e\u305b\u3093
-authenticator.userDataConstraint=\u3053\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306f\u3001\u3053\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30e6\u30fc\u30b6\u30c7\u30fc\u30bf\u306e\u5236\u9650\u306b\u9055\u53cd\u3057\u3066\u3044\u307e\u3059
Deleted: trunk/src/main/java/org/apache/catalina/realm/LocalStrings.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/realm/LocalStrings.properties 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/apache/catalina/realm/LocalStrings.properties 2012-08-27 15:04:39 UTC (rev 2068)
@@ -1,84 +0,0 @@
-# $Id: LocalStrings.properties 970 2009-03-27 12:33:33Z remy.maucherat(a)jboss.com $
-
-# language
-
-# package org.apache.catalina.realm
-
-jaasRealm.beginLogin=JAASRealm login requested for username "{0}" using LoginContext for application "{1}"
-jaasRealm.accountExpired=Username "{0}" NOT authenticated due to expired account
-jaasRealm.authenticateFailure=Username "{0}" NOT successfully authenticated
-jaasRealm.authenticateSuccess=Username "{0}" successfully authenticated as Principal "{1}" -- Subject was created too
-jaasRealm.credentialExpired=Username "{0}" NOT authenticated due to expired credential
-jaasRealm.failedLogin=Username "{0}" NOT authenticated due to failed login
-jaasRealm.loginException=Login exception authenticating username "{0}"
-jaasRealm.unexpectedError=Unexpected error
-jaasRealm.loginContextCreated=JAAS LoginContext created for username "{0}"
-jaasRealm.userPrincipalSuccess=Subject for username "{0}" returned user Principal "{1}"
-jaasRealm.userPrincipalFailure=Subject for username "{0}" did not return a valid user Principal
-jaasRealm.cachePrincipal=User Principal "{0}" cached; has {1} role Principal(s)
-jaasRealm.checkPrincipal=Checking Principal "{0}" [{1}]
-jaasRealm.userPrincipalSuccess=Principal "{0}" is a valid user class. We will use this as the user Principal.
-jaasRealm.userPrincipalFailure=No valid user Principal found
-jaasRealm.rolePrincipalAdd=Adding role Principal "{0}" to this user Principal''s roles
-jaasRealm.rolePrincipalSuccess={0} role Principal(s) found
-jaasRealm.rolePrincipalFailure=No valid role Principals found.
-jaasRealm.isInRole.start=Checking if user Principal "{0}" possesses role "{1}"
-jaasRealm.isInRole.noPrincipalOrRole=No roles Principals found. User Principal or Subject is null, or user Principal not in cache
-jaasRealm.isInRole.principalCached=User Principal has {0} role Principal(s)
-jaasRealm.isInRole.possessesRole=User Principal has a role Principal called "{0}"
-jaasRealm.isInRole.match=Matching role Principal found.
-jaasRealm.isInRole.noMatch=Matching role Principal NOT found.
-jaasCallback.digestpassword=Digested password "{0}" as "{1}"
-jaasCallback.username=Returned username "{0}"
-jaasCallback.password=Returned password "{0}"
-jdbcRealm.authenticateFailure=Username {0} NOT successfully authenticated
-jdbcRealm.authenticateSuccess=Username {0} successfully authenticated
-jdbcRealm.close=Exception closing database connection
-jdbcRealm.exception=Exception performing authentication
-jdbcRealm.getPassword.exception=Exception retrieving password for "{0}"
-jdbcRealm.getRoles.exception=Exception retrieving roles for "{0}"
-jdbcRealm.open=Exception opening database connection
-jdbcRealm.open.invalidurl=Driver "{0}" does not support the url "{1}"
-jndiRealm.authenticateFailure=Username {0} NOT successfully authenticated
-jndiRealm.authenticateSuccess=Username {0} successfully authenticated
-jndiRealm.close=Exception closing directory server connection
-jndiRealm.exception=Exception performing authentication
-jndiRealm.open=Exception opening directory server connection
-memoryRealm.authenticateFailure=Username {0} NOT successfully authenticated
-memoryRealm.authenticateSuccess=Username {0} successfully authenticated
-memoryRealm.loadExist=Memory database file {0} cannot be read
-memoryRealm.loadPath=Loading users from memory database file {0}
-memoryRealm.readXml=Exception while reading memory database file
-memoryRealm.xmlFeatureEncoding=Exception configuring digester to permit java encoding names in XML files. Only IANA encoding names will be supported.
-realmBase.algorithm=Invalid message digest algorithm {0} specified
-realmBase.alreadyStarted=This Realm has already been started
-realmBase.digest=Error digesting user credentials
-realmBase.forbidden=Access to the requested resource has been denied
-realmBase.hasRoleFailure=Username {0} does NOT have role {1}
-realmBase.hasRoleSuccess=Username {0} has role {1}
-realmBase.notAuthenticated=Configuration error: Cannot perform access control without an authenticated principal
-realmBase.notStarted=This Realm has not yet been started
-realmBase.authenticateFailure=Username {0} NOT successfully authenticated
-realmBase.authenticateSuccess=Username {0} successfully authenticated
-userDatabaseRealm.authenticateError=Login configuration error authenticating username {0}
-userDatabaseRealm.lookup=Exception looking up UserDatabase under key {0}
-userDatabaseRealm.noDatabase=No UserDatabase component found under key {0}
-userDatabaseRealm.noEngine=No Engine component found in container hierarchy
-userDatabaseRealm.noGlobal=No global JNDI resources context found
-dataSourceRealm.authenticateFailure=Username {0} NOT successfully authenticated
-dataSourceRealm.authenticateSuccess=Username {0} successfully authenticated
-dataSourceRealm.close=Exception closing database connection
-dataSourceRealm.exception=Exception performing authentication
-dataSourceRealm.getPassword.exception=Exception retrieving password for "{0}"
-dataSourceRealm.getRoles.exception=Exception retrieving roles for "{0}"
-dataSourceRealm.open=Exception opening database connection
-combinedRealm.unexpectedMethod=An unexpected call was made to a method on the combined realm
-combinedRealm.getName=The getName() method should never be called
-combinedRealm.getPassword=The getPassword() method should never be called
-combinedRealm.getPrincipal=The getPrincipal() method should never be called
-combinedRealm.authStart=Attempting to authenticate user "{0}" with realm "{1}"
-combinedRealm.authFailed=Failed to authenticate user "{0}" with realm "{1}"
-combinedRealm.authSucess=Authenticated user "{0}" with realm "{1}"
-combinedRealm.addRealm=Add "{0}" realm, making a total of "{1}" realms
-lockOutRealm.authLockedUser=An attempt was made to authenticate the locked user "{0}"
-lockOutRealm.removeWarning=User "{0}" was removed from the failed users cache after {1} seconds to keep the cache size within the limit set
Deleted: trunk/src/main/java/org/apache/catalina/realm/LocalStrings_es.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/realm/LocalStrings_es.properties 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/apache/catalina/realm/LocalStrings_es.properties 2012-08-27 15:04:39 UTC (rev 2068)
@@ -1,84 +0,0 @@
-jaasRealm.beginLogin = JAASRealm login requerido para nombre de usuario "{0}" usando LoginContext para aplicaci\u00F3n "{1}"
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-# $Id: LocalStrings_es.properties 789 2008-09-22 16:52:37Z remy.maucherat(a)jboss.com $
-# language es
-# package org.apache.catalina.realm
-jaasRealm.accountExpired = El usuario {0} NO ha sido autentificado porque ha expirado su cuenta
-jaasRealm.authenticateFailure = Nombre de usuario "{0}" NO autenticado con \u00E9xito
-jaasRealm.authenticateSuccess = Nombre de usuario "{0}" autenticado con \u00E9xito como Principal "{1}" -- Tambi\u00E9n se ha creado el Asunto
-jaasRealm.credentialExpired = El usuario {0} NO ha sido autentificado porque ha expirado su credencial
-jaasRealm.failedLogin = El usuario {0} NO ha sido autentificado porque ha fallado el login
-jaasRealm.loginException = Excepci\u00F3n de Login autenticando nombre de usuario {0}
-jaasRealm.unexpectedError = Error inesperado
-jaasRealm.loginContextCreated = JAAS LoginContext creado para nombre de usuario "{0}"
-jaasRealm.userPrincipalSuccess = El asunto para el nombre de usuario "{0}" devolvi\u00F3 usuario Principal "{1}"
-jaasRealm.userPrincipalFailure = El asunto para el nombre de usuario "{0}" no devolvi\u00F3 un usuario Principal v\u00E1lido
-jaasRealm.cachePrincipal = Usuario Principal "{0}" en cach\u00E9; tiene {1} papel de Principal
-jaasRealm.checkPrincipal = Revisando Principal "{0}" [{1}]
-jaasRealm.userPrincipalSuccess = El Principal "{0}" es una clase v\u00E1lida de usuario. La vamos a usar como usuario Principal.
-jaasRealm.userPrincipalFailure = No se ha hallado usuario Principal
-jaasRealm.rolePrincipalAdd = A\u00F1adiend papel Principal "{0}" a los papeles de este usuario Principal
-jaasRealm.rolePrincipalSuccess = hallado {0} papeles de Principal
-jaasRealm.rolePrincipalFailure = No se han hallado papeles de Principal v\u00E1lidos.
-jaasRealm.isInRole.start = Revisando si el usuario Principal "{0}" tiene el papel "{1}"
-jaasRealm.isInRole.noPrincipalOrRole = No se han hallado papeles de Principal. El usuario Principal o el Asunto es nulo o el usuario Principal no est\u00E1 en cach\u00E9
-jaasRealm.isInRole.principalCached = El Usuario Principal tiene {0} papeles de Principal
-jaasRealm.isInRole.possessesRole = El Usuario Principal tiene un papele de Principal llamado "{0}"
-jaasRealm.isInRole.match = Hallado papel de Principal coincidente.
-jaasRealm.isInRole.noMatch = NO hallado papel de Principal coincidente.
-jaasCallback.digestpassword = Resumida contrase\u00F1a "{0}" como "{1}"
-jaasCallback.username = Devuelto nombre de usuario "{0}"
-jaasCallback.password = Devuelta contrase\u00F1a "{0}"
-jdbcRealm.authenticateFailure = El usuario {0} NO ha sido autentificado correctamente
-jdbcRealm.authenticateSuccess = El usuario {0} ha sido autentificado correctamente
-jdbcRealm.close = Excepci\u00F3n al cerrar la conexi\u00F3n a la base de datos
-jdbcRealm.exception = Excepci\u00F3n al realizar la autentificaci\u00F3n
-jdbcRealm.getPassword.exception = Excepci\u00F3n recuperando contrase\u00F1a para "{0}"
-jdbcRealm.getRoles.exception = Excepci\u00F3n recuperando papeles para "{0}"
-jdbcRealm.open = Excepci\u00F3n abriendo la conexi\u00F3n a la base de datos
-jndiRealm.authenticateFailure = Autentificaci\u00F3n fallida para el usuario {0}
-jndiRealm.authenticateSuccess = Autentificaci\u00F3n correcta para el usuario {0}
-jndiRealm.close = Excepci\u00F3n al cerrar la conexi\u00F3n al servidor de directorio
-jndiRealm.exception = Excepci\u00F3n al realizar la autentificaci\u00F3n
-jndiRealm.open = Excepci\u00F3n al abrir la conexi\u00F3n al servidor de directorio
-memoryRealm.authenticateFailure = Autentificaci\u00F3n fallida para el usuario {0}
-memoryRealm.authenticateSuccess = Autentificaci\u00F3n correcta para el usuario {0}
-memoryRealm.loadExist = El fichero de usuarios {0} no ha podido ser le\u00EDdo
-memoryRealm.loadPath = Cargando los usuarios desde el fichero {0}
-memoryRealm.readXml = Excepci\u00F3n mientras se le\u00EDa el fichero de usuarios
-realmBase.algorithm = El algoritmo resumen (digest) {0} es inv\u00E1lido
-realmBase.alreadyStarted = Este dominio ya ha sido inicializado
-realmBase.digest = Error procesando las credenciales del usuario
-realmBase.forbidden = El acceso al recurso pedido ha sido denegado
-realmBase.hasRoleFailure = El usuario {0} NO desempe\u00F1a el papel de {1}
-realmBase.hasRoleSuccess = El usuario {0} desempe\u00F1a el papel de {1}
-realmBase.notAuthenticated = Error de Configuraci\u00F3n\: No se pueden realizar funciones de control de acceso sin un principal autentificado
-realmBase.notStarted = Este dominio a\u00FAn no ha sido inicializado
-realmBase.authenticateFailure = Nombre de usuario {0} NO autenticado con \u00E9xito
-realmBase.authenticateSuccess = Nombre de usuario {0} autenticado con \u00E9xito
-userDatabaseRealm.authenticateError = Error de configuraci\u00F3n de Login autenticando nombre de usuario {0}
-userDatabaseRealm.lookup = Excepci\u00F3n buscando en Base de datos de Usuario mediante la clave {0}
-userDatabaseRealm.noDatabase = No se ha hallado componente de Base de datos de Usuario mediante la clave {0}
-userDatabaseRealm.noEngine = No se ha hallado componente de Motor en jerarqu\u00EDa de contenedor
-userDatabaseRealm.noGlobal = No se ha hallado contexto de recursos globales JNDI
-dataSourceRealm.authenticateFailure = Nombre de usuario {0} NO autenticado con \u00E9xito
-dataSourceRealm.authenticateSuccess = Nombre de usuario {0} autenticado con \u00E9xito
-dataSourceRealm.close = Excepci\u00F3n cerrando conexi\u00F3n a base de datos
-dataSourceRealm.exception = Excepci\u00F3n realizando autenticaci\u00F3n
-dataSourceRealm.getPassword.exception = Excepci\u00F3n recuperando contrase\u00F1a para "{0}"
-dataSourceRealm.getRoles.exception = Excepci\u00F3n recuperando papeles para "{0}"
-dataSourceRealm.open = Excepci\u00F3n abriendo conexi\u00F3n a base de datos
-jaasRealm.authenticatedSuccess = El usuario {0} ha sido autentificado con \u00E9xito
Deleted: trunk/src/main/java/org/apache/catalina/realm/LocalStrings_fr.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/realm/LocalStrings_fr.properties 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/apache/catalina/realm/LocalStrings_fr.properties 2012-08-27 15:04:39 UTC (rev 2068)
@@ -1,41 +0,0 @@
-# $Id: LocalStrings_fr.properties 520 2008-03-17 21:29:47Z jfrederic.clere(a)jboss.com $
-
-# language
-
-# package org.apache.catalina.realm
-
-jaasRealm.accountExpired=le nom d''utilisateur {0} N''A PAS �t� authentifi� car le compte a expir�
-jaasRealm.authenticateSuccess=le nom d''utilisateur {0} a �t� authentifi� avec succ�s
-jaasRealm.credentialExpired=le nom d''utilisateur {0} N''A PAS �t� authentifi� car son cr�dit a expir� (expired credential)
-jaasRealm.failedLogin=le nom d''utilisateur {0} N''A PAS �t� authentifi� car son contr�le d''acc�s (login) a �chou�
-jaasRealm.loginException=Exception lors de l''authentification par login du nom d''utilisateur {0}
-jdbcRealm.authenticateFailure=le nom d''utilisateur {0} N''A PAS �t� authentifi�
-jdbcRealm.authenticateSuccess=le nom d''utilisateur {0} a �t� authentifi� avec succ�s
-jdbcRealm.close=Exception lors de la fermeture de la connexion � la base de donn�es
-jdbcRealm.exception=Exception pendant le traitement de l''authentification
-jdbcRealm.open=Exception lors de l''ouverture de la base de donn�es
-jndiRealm.authenticateFailure=Le nom d''utilisateur {0} N''A PAS �t� authentifi�
-jndiRealm.authenticateSuccess=Le nom d''utilisateur {0} a �t� authentifi� avec succ�s
-jndiRealm.close=Exception lors de la fermeture de la connexion au serveur d''acc�s (directory server)
-jndiRealm.exception=Exception pendant le traitement de l''authentification
-jndiRealm.open=Exception lors de l''ouverture de la connexion au serveur d''acc�s (directory server)
-memoryRealm.authenticateFailure=le nom d''utilisateur {0} N''A PAS �t� authentifi�
-memoryRealm.authenticateSuccess=le nom d''utilisateur {0} a �t� authentifi� avec succ�s
-memoryRealm.loadExist=Le fichier base de donn�es m�moire (memory database) {0} ne peut �tre lu
-memoryRealm.loadPath=Chargement des utilisateurs depuis le fichier base de donn�es m�moire (memory database) {0}
-memoryRealm.readXml=Exception lors de la lecture du fichier base de donn�es m�moire (memory database)
-realmBase.algorithm=L''algorithme d''empreinte de message (message digest) {0} indiqu� est invalide
-realmBase.alreadyStarted=Ce royaume (Realm) a d�j� �t� d�marr�
-realmBase.digest=Erreur lors du traitement des empreintes (digest) des cr�dits utilisateur (user credentials)
-realmBase.forbidden=L''acc�s � la ressource demand�e a �t� interdit
-realmBase.hasRoleFailure=Le nom d''utilisateur {0} N''A PAS de r�le {1}
-realmBase.hasRoleSuccess=Le nom d''utilisateur {0} a pour r�le {1}
-realmBase.notAuthenticated=Erreur de configuration: Impossible de conduire un contr�le d''acc�s sans un authentifi� principal (authenticated principal)
-realmBase.notStarted=Ce royaume (Realm) n''a pas encore �t� d�marr�
-realmBase.authenticateFailure=Le nom d''utilisateur {0} N''A PAS �t� authentifi�
-realmBase.authenticateSuccess=Le nom d''utilisateur {0} a �t� authentifi� avec succ�s
-userDatabaseRealm.authenticateError=Erreur de configuration du contr�le d''acc�s (login) lors de l''authentification du nom d''utilisateur {0}
-userDatabaseRealm.lookup=Exception lors de la recherche dans la base de donn�es utilisateurs avec la clef {0}
-userDatabaseRealm.noDatabase=Aucun composant base de donn�es utilisateurs trouv� pour la clef {0}
-userDatabaseRealm.noEngine=Aucun composant moteur (engine component) trouv� dans la hi�rarchie des conteneurs
-userDatabaseRealm.noGlobal=Aucune ressource globale JNDI trouv�e
Deleted: trunk/src/main/java/org/apache/catalina/realm/LocalStrings_ja.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/realm/LocalStrings_ja.properties 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/apache/catalina/realm/LocalStrings_ja.properties 2012-08-27 15:04:39 UTC (rev 2068)
@@ -1,47 +0,0 @@
-# $Id: LocalStrings_ja.properties 520 2008-03-17 21:29:47Z jfrederic.clere(a)jboss.com $
-
-# language ja
-
-# package org.apache.catalina.realm
-
-jaasRealm.accountExpired=\u30e6\u30fc\u30b6\u540d {0} \u306f\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u671f\u9650\u304c\u5207\u308c\u3066\u3044\u308b\u305f\u3081\u306b\u8a8d\u8a3c\u3055\u308c\u307e\u305b\u3093
-jaasRealm.authenticateSuccess=\u30e6\u30fc\u30b6\u540d {0} \u306f\u8a8d\u8a3c\u306b\u6210\u529f\u3057\u307e\u3057\u305f
-jaasRealm.credentialExpired=\u30e6\u30fc\u30b6\u540d {0} \u306f\u8a3c\u660e\u66f8\u306e\u671f\u9650\u304c\u5207\u308c\u305f\u305f\u3081\u306b\u8a8d\u8a3c\u3055\u308c\u307e\u305b\u3093
-jaasRealm.failedLogin=\u30e6\u30fc\u30b6\u540d {0} \u306f\u30ed\u30b0\u30a4\u30f3\u306b\u5931\u6557\u3057\u305f\u305f\u3081\u306b\u8a8d\u8a3c\u3055\u308c\u307e\u305b\u3093\u3067\u3057\u305f
-jaasRealm.loginException=\u30e6\u30fc\u30b6\u540d {0} \u306e\u8a8d\u8a3c\u4e2d\u306b\u30ed\u30b0\u30a4\u30f3\u4f8b\u5916\u304c\u767a\u751f\u3057\u307e\u3057\u305f
-jaasRealm.unexpectedError=\u4e88\u6e2c\u3057\u306a\u3044\u30a8\u30e9\u30fc\u3067\u3059
-jdbcRealm.authenticateFailure=\u30e6\u30fc\u30b6\u540d {0} \u306f\u8a8d\u8a3c\u306b\u5931\u6557\u3057\u307e\u3057\u305f
-jdbcRealm.authenticateSuccess=\u30e6\u30fc\u30b6\u540d {0} \u306f\u8a8d\u8a3c\u306b\u6210\u529f\u3057\u307e\u3057\u305f
-jdbcRealm.close=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u63a5\u7d9a\u30af\u30ed\u30fc\u30ba\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-jdbcRealm.exception=\u8a8d\u8a3c\u5b9f\u884c\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-jdbcRealm.open=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u63a5\u7d9a\u30aa\u30fc\u30d7\u30f3\u4e2d\u306b\u4f8b\u5916\u304c\u767a\u751f\u3057\u307e\u3057\u305f
-jndiRealm.authenticateFailure=\u30e6\u30fc\u30b6\u540d {0} \u306f\u8a8d\u8a3c\u306b\u5931\u6557\u3057\u307e\u3057\u305f
-jndiRealm.authenticateSuccess=\u30e6\u30fc\u30b6\u540d {0} \u306f\u8a8d\u8a3c\u306b\u6210\u529f\u3057\u307e\u3057\u305f
-jndiRealm.close=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30b5\u30fc\u30d0\u63a5\u7d9a\u30af\u30ed\u30fc\u30ba\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-jndiRealm.exception=\u8a8d\u8a3c\u5b9f\u884c\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-jndiRealm.open=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30b5\u30fc\u30d0\u63a5\u7d9a\u30aa\u30fc\u30d7\u30f3\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-memoryRealm.authenticateFailure=\u30e6\u30fc\u30b6\u540d {0} \u306f\u8a8d\u8a3c\u306b\u5931\u6557\u3057\u307e\u3057\u305f
-memoryRealm.authenticateSuccess=\u30e6\u30fc\u30b6\u540d {0} \u306f\u8a8d\u8a3c\u306b\u6210\u529f\u3057\u307e\u3057\u305f
-memoryRealm.loadExist=\u30e1\u30e2\u30ea\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb {0} \u3092\u8aad\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093
-memoryRealm.loadPath=\u30e1\u30e2\u30ea\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb {0} \u304b\u3089\u30e6\u30fc\u30b6\u3092\u30ed\u30fc\u30c9\u3057\u307e\u3059
-memoryRealm.readXml=\u30e1\u30e2\u30ea\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u307f\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-realmBase.algorithm=\u7121\u52b9\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u30c0\u30a4\u30b8\u30a7\u30b9\u30c8\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0 {0} \u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059
-realmBase.alreadyStarted=\u3053\u306e\u30ec\u30eb\u30e0\u306f\u65e2\u306b\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u3059
-realmBase.digest=\u30e6\u30fc\u30b6\u306e\u8a3c\u660e\u66f8\u306e\u30c0\u30a4\u30b8\u30a7\u30b9\u30c8\u30a8\u30e9\u30fc
-realmBase.forbidden=\u8981\u6c42\u3055\u308c\u305f\u30ea\u30bd\u30fc\u30b9\u3078\u306e\u30a2\u30af\u30bb\u30b9\u304c\u62d2\u5426\u3055\u308c\u307e\u3057\u305f
-realmBase.hasRoleFailure=\u30e6\u30fc\u30b6\u540d {0} \u306f\u30ed\u30fc\u30eb {1} \u3092\u6301\u3063\u3066\u3044\u307e\u305b\u3093
-realmBase.hasRoleSuccess=\u30e6\u30fc\u30b6\u540d {0} \u306f\u30ed\u30fc\u30eb {1} \u3092\u6301\u3063\u3066\u3044\u307e\u3059
-realmBase.notAuthenticated=\u8a2d\u5b9a\u30a8\u30e9\u30fc: \u8a8d\u8a3c\u3055\u308c\u305f\u4e3b\u4f53\u306a\u3057\u3067\u306f\u30a2\u30af\u30bb\u30b9\u5236\u5fa1\u304c\u5b9f\u884c\u3067\u304d\u307e\u305b\u3093
-realmBase.notStarted=\u3053\u306e\u30ec\u30eb\u30e0\u306f\u307e\u3060\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u305b\u3093
-realmBase.authenticateFailure=\u30e6\u30fc\u30b6\u540d {0} \u306f\u8a8d\u8a3c\u306b\u5931\u6557\u3057\u307e\u3057\u305f
-realmBase.authenticateSuccess=\u30e6\u30fc\u30b6\u540d {0} \u306f\u8a8d\u8a3c\u306b\u6210\u529f\u3057\u307e\u3057\u305f
-userDatabaseRealm.authenticateError=\u30e6\u30fc\u30b6\u540d {0} \u3092\u8a8d\u8a3c\u4e2d\u306b\u30ed\u30b0\u30a4\u30f3\u8a2d\u5b9a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f
-userDatabaseRealm.lookup=\u30ad\u30fc {0} \u3067\u30e6\u30fc\u30b6\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u691c\u7d22\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-userDatabaseRealm.noDatabase=\u30ad\u30fc {0} \u3067\u30e6\u30fc\u30b6\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093
-userDatabaseRealm.noEngine=\u30b3\u30f3\u30c6\u30ca\u968e\u5c64\u4e2d\u306b\u30a8\u30f3\u30b8\u30f3\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093
-userDatabaseRealm.noGlobal=\u30b0\u30ed\u30fc\u30d0\u30eb\u306aJNDI\u30ea\u30bd\u30fc\u30b9\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093
-dataSourceRealm.authenticateFailure=\u30e6\u30fc\u30b6\u540d {0} \u306f\u8a8d\u8a3c\u306b\u5931\u6557\u3057\u307e\u3057\u305f
-dataSourceRealm.authenticateSuccess=\u30e6\u30fc\u30b6\u540d {0} \u306f\u8a8d\u8a3c\u306b\u6210\u529f\u3057\u307e\u3057\u305f
-dataSourceRealm.close=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u63a5\u7d9a\u3092\u30af\u30ed\u30fc\u30ba\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-dataSourceRealm.exception=\u8a8d\u8a3c\u3092\u5b9f\u884c\u4e2d\u306e\u4f8b\u5916\u3067\u3059
-dataSourceRealm.open=\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u63a5\u7d9a\u3092\u30aa\u30fc\u30d7\u30f3\u4e2d\u306e\u4f8b\u5916\u3067\u3059
Modified: trunk/src/main/java/org/apache/catalina/valves/AccessLogValve.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/valves/AccessLogValve.java 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/apache/catalina/valves/AccessLogValve.java 2012-08-27 15:04:39 UTC (rev 2068)
@@ -19,6 +19,8 @@
package org.apache.catalina.valves;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
@@ -27,7 +29,6 @@
import java.net.InetAddress;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
-import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.TimeZone;
@@ -42,7 +43,6 @@
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.util.LifecycleSupport;
-import org.apache.catalina.util.StringManager;
import org.apache.coyote.RequestInfo;
import org.jboss.logging.Logger;
@@ -191,13 +191,6 @@
/**
- * The string manager for this package.
- */
- protected StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- /**
* Has this component been started yet?
*/
protected boolean started = false;
@@ -848,8 +841,7 @@
// Validate and update our current component state
if (started)
- throw new LifecycleException(sm
- .getString("accessLogValve.alreadyStarted"));
+ throw new LifecycleException(MESSAGES.valveAlreadyStarted());
lifecycle.fireLifecycleEvent(START_EVENT, null);
started = true;
@@ -889,8 +881,7 @@
// Validate and update our current component state
if (!started)
- throw new LifecycleException(sm
- .getString("accessLogValve.notStarted"));
+ throw new LifecycleException(MESSAGES.valveNotStarted());
lifecycle.fireLifecycleEvent(STOP_EVENT, null);
started = false;
Modified: trunk/src/main/java/org/apache/catalina/valves/ErrorReportValve.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/valves/ErrorReportValve.java 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/apache/catalina/valves/ErrorReportValve.java 2012-08-27 15:04:39 UTC (rev 2068)
@@ -19,6 +19,8 @@
package org.apache.catalina.valves;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.IOException;
import java.io.Writer;
@@ -30,7 +32,6 @@
import org.apache.catalina.connector.Response;
import org.apache.catalina.util.RequestUtil;
import org.apache.catalina.util.ServerInfo;
-import org.apache.catalina.util.StringManager;
/**
* <p>Implementation of a Valve that outputs HTML error pages.</p>
@@ -62,13 +63,6 @@
"org.apache.catalina.valves.ErrorReportValve/1.0";
- /**
- * The StringManager for this package.
- */
- protected static StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
// ------------------------------------------------------------- Properties
@@ -164,10 +158,36 @@
// Do nothing if there is no report for the specified status code
String report = null;
- try {
- report = sm.getString("http." + statusCode, message);
- } catch (Throwable t) {
- ;
+ switch (statusCode) {
+ case 404: report = MESSAGES.http404(message); break;
+ case 500: report = MESSAGES.http500(message); break;
+ case 400: report = MESSAGES.http400(message); break;
+ case 401: report = MESSAGES.http401(message); break;
+ case 402: report = MESSAGES.http402(message); break;
+ case 403: report = MESSAGES.http403(message); break;
+ case 405: report = MESSAGES.http405(message); break;
+ case 406: report = MESSAGES.http406(message); break;
+ case 407: report = MESSAGES.http407(message); break;
+ case 408: report = MESSAGES.http408(message); break;
+ case 409: report = MESSAGES.http409(message); break;
+ case 410: report = MESSAGES.http410(message); break;
+ case 411: report = MESSAGES.http411(message); break;
+ case 412: report = MESSAGES.http412(message); break;
+ case 413: report = MESSAGES.http413(message); break;
+ case 414: report = MESSAGES.http414(message); break;
+ case 415: report = MESSAGES.http415(message); break;
+ case 416: report = MESSAGES.http416(message); break;
+ case 417: report = MESSAGES.http417(message); break;
+ case 422: report = MESSAGES.http422(message); break;
+ case 423: report = MESSAGES.http423(message); break;
+ case 501: report = MESSAGES.http501(message); break;
+ case 502: report = MESSAGES.http502(message); break;
+ case 503: report = MESSAGES.http503(message); break;
+ case 504: report = MESSAGES.http504(message); break;
+ case 505: report = MESSAGES.http505(message); break;
+ case 507: report = MESSAGES.http507(message); break;
+ default:
+ return;
}
if (report == null)
return;
@@ -176,29 +196,28 @@
sb.append("<html><head><title>");
sb.append(ServerInfo.getServerInfo()).append(" - ");
- sb.append(sm.getString("errorReportValve.errorReport"));
+ sb.append(MESSAGES.errorReport());
sb.append("</title>");
sb.append("<style><!--");
sb.append(org.apache.catalina.util.TomcatCSS.TOMCAT_CSS);
sb.append("--></style> ");
sb.append("</head><body>");
sb.append("<h1>");
- sb.append(sm.getString("errorReportValve.statusHeader",
- "" + statusCode, message)).append("</h1>");
+ sb.append(MESSAGES.statusHeader(statusCode, message)).append("</h1>");
sb.append("<HR size=\"1\" noshade=\"noshade\">");
sb.append("<p><b>type</b> ");
if (throwable != null) {
- sb.append(sm.getString("errorReportValve.exceptionReport"));
+ sb.append(MESSAGES.exceptionReport());
} else {
- sb.append(sm.getString("errorReportValve.statusReport"));
+ sb.append(MESSAGES.statusReport());
}
sb.append("</p>");
sb.append("<p><b>");
- sb.append(sm.getString("errorReportValve.message"));
+ sb.append(MESSAGES.statusMessage());
sb.append("</b> <u>");
sb.append(message).append("</u></p>");
sb.append("<p><b>");
- sb.append(sm.getString("errorReportValve.description"));
+ sb.append(MESSAGES.statusDescritpion());
sb.append("</b> <u>");
sb.append(report);
sb.append("</u></p>");
@@ -207,7 +226,7 @@
String stackTrace = getPartialServletStackTrace(throwable);
sb.append("<p><b>");
- sb.append(sm.getString("errorReportValve.exception"));
+ sb.append(MESSAGES.statusException());
sb.append("</b> <pre>");
sb.append(RequestUtil.filter(stackTrace));
sb.append("</pre></p>");
@@ -217,7 +236,7 @@
while (rootCause != null && (loops < 10)) {
stackTrace = getPartialServletStackTrace(rootCause);
sb.append("<p><b>");
- sb.append(sm.getString("errorReportValve.rootCause"));
+ sb.append(MESSAGES.statusRootCause());
sb.append("</b> <pre>");
sb.append(RequestUtil.filter(stackTrace));
sb.append("</pre></p>");
@@ -227,10 +246,9 @@
}
sb.append("<p><b>");
- sb.append(sm.getString("errorReportValve.note"));
+ sb.append(MESSAGES.statusNote());
sb.append("</b> <u>");
- sb.append(sm.getString("errorReportValve.rootCauseInLogs",
- ServerInfo.getServerInfo()));
+ sb.append(MESSAGES.statusRootCauseInLogs(ServerInfo.getServerInfo()));
sb.append("</u></p>");
}
Modified: trunk/src/main/java/org/apache/catalina/valves/EventOrAsyncConnectionManagerValve.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/valves/EventOrAsyncConnectionManagerValve.java 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/apache/catalina/valves/EventOrAsyncConnectionManagerValve.java 2012-08-27 15:04:39 UTC (rev 2068)
@@ -19,6 +19,8 @@
package org.apache.catalina.valves;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
@@ -38,7 +40,6 @@
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.util.LifecycleSupport;
-import org.apache.catalina.util.StringManager;
import org.jboss.servlet.http.HttpEvent;
@@ -68,13 +69,6 @@
/**
- * The string manager for this package.
- */
- protected StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- /**
* The lifecycle event support for this component.
*/
protected LifecycleSupport lifecycle = new LifecycleSupport(this);
@@ -154,7 +148,7 @@
// Validate and update our current component state
if (started)
throw new LifecycleException
- (sm.getString("semaphoreValve.alreadyStarted"));
+ (MESSAGES.valveAlreadyStarted());
lifecycle.fireLifecycleEvent(START_EVENT, null);
started = true;
@@ -178,7 +172,7 @@
// Validate and update our current component state
if (!started)
throw new LifecycleException
- (sm.getString("semaphoreValve.notStarted"));
+ (MESSAGES.valveNotStarted());
lifecycle.fireLifecycleEvent(STOP_EVENT, null);
started = false;
@@ -210,9 +204,7 @@
try {
request.getEvent().close();
} catch (Exception e) {
- container.getLogger().warn(
- sm.getString("cometConnectionManagerValve.event"),
- e);
+ container.getLogger().warn(MESSAGES.eventValveExceptionDuringEvent(), e);
}
}
cometRequests.clear();
@@ -359,8 +351,7 @@
try {
req.getEvent().close();
} catch (Exception e) {
- req.getWrapper().getParent().getLogger().warn(sm.getString(
- "cometConnectionManagerValve.listenerEvent"), e);
+ req.getWrapper().getParent().getLogger().warn(MESSAGES.eventValveSessionListenerException(), e);
}
}
}
Modified: trunk/src/main/java/org/apache/catalina/valves/JDBCAccessLogValve.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/valves/JDBCAccessLogValve.java 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/apache/catalina/valves/JDBCAccessLogValve.java 2012-08-27 15:04:39 UTC (rev 2068)
@@ -19,6 +19,8 @@
package org.apache.catalina.valves;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.IOException;
import java.sql.Connection;
import java.sql.Driver;
@@ -35,7 +37,6 @@
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.util.LifecycleSupport;
-import org.apache.catalina.util.StringManager;
/**
* <p>
@@ -228,12 +229,6 @@
/**
- * The string manager for this package.
- */
- private StringManager sm = StringManager.getManager(Constants.Package);
-
-
- /**
* Has this component been started yet?
*/
private boolean started = false;
@@ -517,7 +512,7 @@
return;
} catch (SQLException e) {
// Log the problem for posterity
- container.getLogger().error(sm.getString("jdbcAccessLogValve.exception"), e);
+ container.getLogger().error(MESSAGES.jdbcAccessLogValveInsertError(), e);
// Close the connection so that it gets reopened next time
if (conn != null)
@@ -637,7 +632,7 @@
try {
conn.close();
} catch (SQLException e) {
- container.getLogger().error(sm.getString("jdbcAccessLogValeve.close"), e); // Just log it here
+ container.getLogger().error(MESSAGES.jdbcAccessLogValveConnectionCloseError(), e); // Just log it here
} finally {
this.conn = null;
}
@@ -653,7 +648,7 @@
if (started)
throw new LifecycleException
- (sm.getString("accessLogValve.alreadyStarted"));
+ (MESSAGES.valveAlreadyStarted());
lifecycle.fireLifecycleEvent(START_EVENT, null);
started = true;
@@ -676,7 +671,7 @@
if (!started)
throw new LifecycleException
- (sm.getString("accessLogValve.notStarted"));
+ (MESSAGES.valveNotStarted());
lifecycle.fireLifecycleEvent(STOP_EVENT, null);
started = false;
Modified: trunk/src/main/java/org/apache/catalina/valves/RequestFilterValve.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/valves/RequestFilterValve.java 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/apache/catalina/valves/RequestFilterValve.java 2012-08-27 15:04:39 UTC (rev 2068)
@@ -19,6 +19,8 @@
package org.apache.catalina.valves;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.IOException;
import java.util.ArrayList;
import java.util.regex.Pattern;
@@ -29,7 +31,6 @@
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
-import org.apache.catalina.util.StringManager;
/**
* Implementation of a Valve that performs filtering based on comparing the
@@ -79,13 +80,6 @@
"org.apache.catalina.valves.RequestFilterValve/1.0";
- /**
- * The StringManager for this package.
- */
- protected static StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
// ----------------------------------------------------- Instance Variables
@@ -227,7 +221,7 @@
reList.add(Pattern.compile(pattern));
} catch (PatternSyntaxException e) {
IllegalArgumentException iae = new IllegalArgumentException
- (sm.getString("requestFilterValve.syntax", pattern));
+ (MESSAGES.requestFilterValvePatternError(pattern));
iae.initCause(e);
throw iae;
}
Modified: trunk/src/main/java/org/apache/catalina/valves/SSLValve.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/valves/SSLValve.java 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/apache/catalina/valves/SSLValve.java 2012-08-27 15:04:39 UTC (rev 2068)
@@ -62,8 +62,6 @@
*/
public class SSLValve extends ValveBase {
- private static Logger log = Logger.getLogger(SSLValve.class);
-
//------------------------------------------------------ Constructor
public SSLValve() {
}
Modified: trunk/src/main/java/org/apache/catalina/valves/SemaphoreValve.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/valves/SemaphoreValve.java 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/apache/catalina/valves/SemaphoreValve.java 2012-08-27 15:04:39 UTC (rev 2068)
@@ -19,6 +19,8 @@
package org.apache.catalina.valves;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.IOException;
import java.util.concurrent.Semaphore;
@@ -30,7 +32,6 @@
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.util.LifecycleSupport;
-import org.apache.catalina.util.StringManager;
/**
@@ -59,13 +60,6 @@
/**
- * The string manager for this package.
- */
- private StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- /**
* Semaphore.
*/
protected Semaphore semaphore = null;
@@ -169,7 +163,7 @@
// Validate and update our current component state
if (started)
throw new LifecycleException
- (sm.getString("semaphoreValve.alreadyStarted"));
+ (MESSAGES.valveAlreadyStarted());
lifecycle.fireLifecycleEvent(START_EVENT, null);
started = true;
@@ -191,7 +185,7 @@
// Validate and update our current component state
if (!started)
throw new LifecycleException
- (sm.getString("semaphoreValve.notStarted"));
+ (MESSAGES.valveNotStarted());
lifecycle.fireLifecycleEvent(STOP_EVENT, null);
started = false;
Modified: trunk/src/main/java/org/jboss/web/CatalinaMessages.java
===================================================================
--- trunk/src/main/java/org/jboss/web/CatalinaMessages.java 2012-08-24 13:44:02 UTC (rev 2067)
+++ trunk/src/main/java/org/jboss/web/CatalinaMessages.java 2012-08-27 15:04:39 UTC (rev 2068)
@@ -108,4 +108,175 @@
@Message(id = 21, value = "Missing MD5 digest")
IllegalArgumentException noMD5Digest(@Cause NoSuchAlgorithmException e);
+ @Message(id = 22, value = "The client may continue (%s).")
+ String http100(String resource);
+
+ @Message(id = 23, value = "The server is switching protocols according to the 'Upgrade' header (%s).")
+ String http101(String resource);
+
+ @Message(id = 24, value = "The request succeeded and a new resource (%s) has been created on the server.")
+ String http201(String resource);
+
+ @Message(id = 25, value = "This request was accepted for processing, but has not been completed (%s).")
+ String http202(String resource);
+
+ @Message(id = 26, value = "The meta information presented by the client did not originate from the server (%s).")
+ String http203(String resource);
+
+ @Message(id = 27, value = "The request succeeded but there is no information to return (%s).")
+ String http204(String resource);
+
+ @Message(id = 28, value = "The client should reset the document view which caused this request to be sent (%s).")
+ String http205(String resource);
+
+ @Message(id = 29, value = "The server has fulfilled a partial GET request for this resource (%s).")
+ String http206(String resource);
+
+ @Message(id = 30, value = "Multiple status values have been returned (%s).")
+ String http207(String resource);
+
+ @Message(id = 31, value = "The requested resource (%s) corresponds to any one of a set of representations, each with its own specific location.")
+ String http300(String resource);
+
+ @Message(id = 32, value = "The requested resource (%s) has moved permanently to a new location.")
+ String http301(String resource);
+
+ @Message(id = 33, value = "The requested resource (%s) has moved temporarily to a new location.")
+ String http302(String resource);
+
+ @Message(id = 34, value = "The response to this request can be found under a different URI (%s).")
+ String http303(String resource);
+
+ @Message(id = 35, value = "The requested resource (%s) is available and has not been modified.")
+ String http304(String resource);
+
+ @Message(id = 36, value = "The requested resource (%s) must be accessed through the proxy given by the 'Location' header.")
+ String http305(String resource);
+
+ @Message(id = 37, value = "The request sent by the client was syntactically incorrect (%s).")
+ String http400(String resource);
+
+ @Message(id = 38, value = "This request requires HTTP authentication (%s).")
+ String http401(String resource);
+
+ @Message(id = 39, value = "Payment is required for access to this resource (%s).")
+ String http402(String resource);
+
+ @Message(id = 40, value = "Access to the specified resource (%s) has been forbidden.")
+ String http403(String resource);
+
+ @Message(id = 41, value = "The requested resource (%s) is not available.")
+ String http404(String resource);
+
+ @Message(id = 42, value = "The specified HTTP method is not allowed for the requested resource (%s).")
+ String http405(String resource);
+
+ @Message(id = 43, value = "The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request 'Accept' headers (%s).")
+ String http406(String resource);
+
+ @Message(id = 44, value = "The client must first authenticate itself with the proxy (%s).")
+ String http407(String resource);
+
+ @Message(id = 45, value = "The client did not produce a request within the time that the server was prepared to wait (%s).")
+ String http408(String resource);
+
+ @Message(id = 46, value = "The request could not be completed due to a conflict with the current state of the resource (%s).")
+ String http409(String resource);
+
+ @Message(id = 47, value = "The requested resource (%s) is no longer available, and no forwarding address is known.")
+ String http410(String resource);
+
+ @Message(id = 48, value = "This request cannot be handled without a defined content length (%s).")
+ String http411(String resource);
+
+ @Message(id = 49, value = "A specified precondition has failed for this request (%s).")
+ String http412(String resource);
+
+ @Message(id = 50, value = "The request entity is larger than the server is willing or able to process (%s).")
+ String http413(String resource);
+
+ @Message(id = 51, value = "The server refused this request because the request URI was too long (%s).")
+ String http414(String resource);
+
+ @Message(id = 52, value = "The server refused this request because the request entity is in a format not supported by the requested resource for the requested method (%s).")
+ String http415(String resource);
+
+ @Message(id = 53, value = "The requested byte range cannot be satisfied (%s).")
+ String http416(String resource);
+
+ @Message(id = 54, value = "The expectation given in the 'Expect' request header (%s) could not be fulfilled.")
+ String http417(String resource);
+
+ @Message(id = 55, value = "The server understood the content type and syntax of the request but was unable to process the contained instructions (%s).")
+ String http422(String resource);
+
+ @Message(id = 56, value = "The source or destination resource of a method is locked (%s).")
+ String http423(String resource);
+
+ @Message(id = 57, value = "The server encountered an internal error (%s) that prevented it from fulfilling this request.")
+ String http500(String resource);
+
+ @Message(id = 58, value = "The server does not support the functionality needed to fulfill this request (%s).")
+ String http501(String resource);
+
+ @Message(id = 59, value = "This server received an invalid response from a server it consulted when acting as a proxy or gateway (%s).")
+ String http502(String resource);
+
+ @Message(id = 60, value = "The requested service (%s) is not currently available.")
+ String http503(String resource);
+
+ @Message(id = 61, value = "The server received a timeout from an upstream server while acting as a gateway or proxy (%s).")
+ String http504(String resource);
+
+ @Message(id = 62, value = "The server does not support the requested HTTP protocol version (%s).")
+ String http505(String resource);
+
+ @Message(id = 63, value = "The resource does not have sufficient space to record the state of the resource after execution of this method (%s).")
+ String http507(String resource);
+
+ @Message(id = 64, value = "Error report")
+ String errorReport();
+
+ @Message(id = 65, value = "HTTP Status %s - %s")
+ String statusHeader(int statusCode, String message);
+
+ @Message(id = 66, value = "Exception report")
+ String exceptionReport();
+
+ @Message(id = 67, value = "Status report")
+ String statusReport();
+
+ @Message(id = 68, value = "message")
+ String statusMessage();
+
+ @Message(id = 69, value = "description")
+ String statusDescritpion();
+
+ @Message(id = 70, value = "exception")
+ String statusException();
+
+ @Message(id = 71, value = "root cause")
+ String statusRootCause();
+
+ @Message(id = 72, value = "note")
+ String statusNote();
+
+ @Message(id = 73, value = "The full stack trace of the root cause is available in the %s logs.")
+ String statusRootCauseInLogs(String log);
+
+ @Message(id = 74, value = "Exception processing event.")
+ String eventValveExceptionDuringEvent();
+
+ @Message(id = 75, value = "Exception processing session listener event.")
+ String eventValveSessionListenerException();
+
+ @Message(id = 76, value = "Exception performing insert access entry.")
+ String jdbcAccessLogValveInsertError();
+
+ @Message(id = 77, value = "Exception closing database connection.")
+ String jdbcAccessLogValveConnectionCloseError();
+
+ @Message(id = 78, value = "Syntax error in request filter pattern %s")
+ String requestFilterValvePatternError(String pattern);
+
}
Added: trunk/src/main/resources/org/apache/catalina/util/CharsetMapperDefault.properties
===================================================================
--- trunk/src/main/resources/org/apache/catalina/util/CharsetMapperDefault.properties (rev 0)
+++ trunk/src/main/resources/org/apache/catalina/util/CharsetMapperDefault.properties 2012-08-27 15:04:39 UTC (rev 2068)
@@ -0,0 +1,2 @@
+en=ISO-8859-1
+fr=ISO-8859-1
Added: trunk/src/main/resources/org/apache/tomcat/util/http/HttpMessages.properties
===================================================================
--- trunk/src/main/resources/org/apache/tomcat/util/http/HttpMessages.properties (rev 0)
+++ trunk/src/main/resources/org/apache/tomcat/util/http/HttpMessages.properties 2012-08-27 15:04:39 UTC (rev 2068)
@@ -0,0 +1,46 @@
+# HttpMessages
+sc.100=Continue
+sc.101=Switching Protocols
+sc.200=OK
+sc.201=Created
+sc.202=Accepted
+sc.203=Non-Authoritative Information
+sc.204=No Content
+sc.205=Reset Content
+sc.206=Partial Content
+sc.207=Multi-Status
+sc.300=Multiple Choices
+sc.301=Moved Permanently
+sc.302=Moved Temporarily
+sc.303=See Other
+sc.304=Not Modified
+sc.305=Use Proxy
+sc.307=Temporary Redirect
+sc.400=Bad Request
+sc.401=Unauthorized
+sc.402=Payment Required
+sc.403=Forbidden
+sc.404=Not Found
+sc.405=Method Not Allowed
+sc.406=Not Acceptable
+sc.407=Proxy Authentication Required
+sc.408=Request Timeout
+sc.409=Conflict
+sc.410=Gone
+sc.411=Length Required
+sc.412=Precondition Failed
+sc.413=Request Entity Too Large
+sc.414=Request-URI Too Long
+sc.415=Unsupported Media Type
+sc.416=Requested Range Not Satisfiable
+sc.417=Expectation Failed
+sc.422=Unprocessable Entity
+sc.423=Locked
+sc.424=Failed Dependency
+sc.500=Internal Server Error
+sc.501=Not Implemented
+sc.502=Bad Gateway
+sc.503=Service Unavailable
+sc.504=Gateway Timeout
+sc.505=HTTP Version Not Supported
+sc.507=Insufficient Storage
12 years, 4 months
JBossWeb SVN: r2067 - in trunk/src/main/java/org: apache/catalina/realm and 2 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-08-24 09:44:02 -0400 (Fri, 24 Aug 2012)
New Revision: 2067
Modified:
trunk/src/main/java/org/apache/catalina/authenticator/AuthenticatorBase.java
trunk/src/main/java/org/apache/catalina/authenticator/DigestAuthenticator.java
trunk/src/main/java/org/apache/catalina/authenticator/FormAuthenticator.java
trunk/src/main/java/org/apache/catalina/authenticator/SSLAuthenticator.java
trunk/src/main/java/org/apache/catalina/realm/RealmBase.java
trunk/src/main/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java
trunk/src/main/java/org/apache/catalina/valves/SSLValve.java
trunk/src/main/java/org/apache/catalina/valves/ValveBase.java
trunk/src/main/java/org/jboss/web/CatalinaLogger.java
trunk/src/main/java/org/jboss/web/CatalinaMessages.java
Log:
Start the main catalina.* packages.
Modified: trunk/src/main/java/org/apache/catalina/authenticator/AuthenticatorBase.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/authenticator/AuthenticatorBase.java 2012-08-23 11:42:33 UTC (rev 2066)
+++ trunk/src/main/java/org/apache/catalina/authenticator/AuthenticatorBase.java 2012-08-24 13:44:02 UTC (rev 2067)
@@ -19,6 +19,8 @@
package org.apache.catalina.authenticator;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.IOException;
import java.security.Principal;
import java.text.SimpleDateFormat;
@@ -145,13 +147,6 @@
/**
- * The string manager for this package.
- */
- protected static final StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- /**
* The SingleSignOn implementation in our request processing chain,
* if there is one.
*/
@@ -226,8 +221,7 @@
public void setContainer(Container container) {
if (!(container instanceof Context))
- throw new IllegalArgumentException
- (sm.getString("authenticator.notContext"));
+ throw MESSAGES.authenticatorNeedsContext();
super.setContainer(container);
this.context = (Context) container;
@@ -774,8 +768,7 @@
// Validate and update our current component state
if (started)
- throw new LifecycleException
- (sm.getString("authenticator.alreadyStarted"));
+ throw new LifecycleException(MESSAGES.authenticatorAlreadyStarted());
lifecycle.fireLifecycleEvent(START_EVENT, null);
started = true;
@@ -819,8 +812,7 @@
// Validate and update our current component state
if (!started)
- throw new LifecycleException
- (sm.getString("authenticator.notStarted"));
+ throw new LifecycleException(MESSAGES.authenticatorNotStarted());
lifecycle.fireLifecycleEvent(STOP_EVENT, null);
started = false;
Modified: trunk/src/main/java/org/apache/catalina/authenticator/DigestAuthenticator.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/authenticator/DigestAuthenticator.java 2012-08-23 11:42:33 UTC (rev 2066)
+++ trunk/src/main/java/org/apache/catalina/authenticator/DigestAuthenticator.java 2012-08-24 13:44:02 UTC (rev 2067)
@@ -40,6 +40,7 @@
import org.apache.catalina.deploy.LoginConfig;
import org.apache.catalina.util.MD5Encoder;
import org.jboss.logging.Logger;
+import org.jboss.web.CatalinaLogger;
@@ -483,8 +484,7 @@
currentTime - eldest.getValue().getTimestamp() <
getNonceValidity()) {
// Replay attack is possible
- log.warn(sm.getString(
- "digestAuthenticator.cacheRemove"));
+ CatalinaLogger.AUTH_LOGGER.digestCacheRemove();
lastLog = currentTime + LOG_SUPPRESS_TIME;
}
return true;
Modified: trunk/src/main/java/org/apache/catalina/authenticator/FormAuthenticator.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/authenticator/FormAuthenticator.java 2012-08-23 11:42:33 UTC (rev 2066)
+++ trunk/src/main/java/org/apache/catalina/authenticator/FormAuthenticator.java 2012-08-24 13:44:02 UTC (rev 2067)
@@ -19,6 +19,8 @@
package org.apache.catalina.authenticator;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.IOException;
import java.io.InputStream;
import java.security.Principal;
@@ -258,8 +260,7 @@
saveRequest(request, session);
} catch (IOException ioe) {
log.debug("Request body too big to save during authentication");
- response.sendError(HttpServletResponse.SC_FORBIDDEN,
- sm.getString("authenticator.requestBodyTooBig"));
+ response.sendError(HttpServletResponse.SC_FORBIDDEN, MESSAGES.requestBodyTooLarge());
return (false);
}
forwardToLoginPage(request, response, config);
@@ -294,7 +295,7 @@
("User took so long to log on the session expired");
if (landingPage == null) {
response.sendError(HttpServletResponse.SC_REQUEST_TIMEOUT,
- sm.getString("authenticator.sessionExpired"));
+ MESSAGES.sessionTimeoutDuringAuthentication());
} else {
// Make the authenticator think the user originally requested
// the landing page
@@ -323,7 +324,7 @@
if (requestURI == null)
if (landingPage == null) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST,
- sm.getString("authenticator.formlogin"));
+ MESSAGES.invalidFormLoginDirectReference());
} else {
// Make the authenticator think the user originally requested
// the landing page
@@ -361,7 +362,7 @@
try {
disp.forward(request.getRequest(), response);
} catch (Throwable t) {
- String msg = sm.getString("formAuthenticator.forwardLoginFail");
+ String msg = MESSAGES.errorForwardingToFormLogin();
log.warn(msg, t);
request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
@@ -388,7 +389,7 @@
try {
disp.forward(request.getRequest(), response);
} catch (Throwable t) {
- String msg = sm.getString("formAuthenticator.forwardErrorFail");
+ String msg = MESSAGES.errorForwardingToFormError();
log.warn(msg, t);
request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
Modified: trunk/src/main/java/org/apache/catalina/authenticator/SSLAuthenticator.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/authenticator/SSLAuthenticator.java 2012-08-23 11:42:33 UTC (rev 2066)
+++ trunk/src/main/java/org/apache/catalina/authenticator/SSLAuthenticator.java 2012-08-24 13:44:02 UTC (rev 2067)
@@ -19,6 +19,8 @@
package org.apache.catalina.authenticator;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.IOException;
import java.security.Principal;
import java.security.cert.X509Certificate;
@@ -127,7 +129,7 @@
if (getContainer().getLogger().isDebugEnabled())
getContainer().getLogger().debug(" No certificates included with this request");
response.sendError(HttpServletResponse.SC_UNAUTHORIZED,
- sm.getString("authenticator.certificates"));
+ MESSAGES.missingRequestCertificate());
return (false);
}
@@ -137,7 +139,7 @@
if (getContainer().getLogger().isDebugEnabled())
getContainer().getLogger().debug(" Realm.authenticate() returned false");
response.sendError(HttpServletResponse.SC_UNAUTHORIZED,
- sm.getString("authenticator.unauthorized"));
+ MESSAGES.certificateAuthenticationFailure());
return (false);
}
Modified: trunk/src/main/java/org/apache/catalina/realm/RealmBase.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/realm/RealmBase.java 2012-08-23 11:42:33 UTC (rev 2066)
+++ trunk/src/main/java/org/apache/catalina/realm/RealmBase.java 2012-08-24 13:44:02 UTC (rev 2067)
@@ -19,6 +19,8 @@
package org.apache.catalina.realm;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.IOException;
@@ -38,7 +40,6 @@
import org.apache.catalina.Container;
import org.apache.catalina.Context;
import org.apache.catalina.Engine;
-import org.apache.catalina.Globals;
import org.apache.catalina.Host;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleException;
@@ -55,9 +56,9 @@
import org.apache.catalina.util.HexUtils;
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.MD5Encoder;
-import org.apache.catalina.util.StringManager;
import org.apache.tomcat.util.modeler.Registry;
import org.jboss.logging.Logger;
+import org.jboss.web.CatalinaLogger;
/**
* Simple implementation of <b>Realm</b> that reads an XML file to configure
@@ -71,8 +72,6 @@
public abstract class RealmBase
implements Lifecycle, Realm, MBeanRegistration {
- private static Logger log = Logger.getLogger(RealmBase.class);
-
// ----------------------------------------------------- Instance Variables
@@ -134,13 +133,6 @@
/**
- * The string manager for this package.
- */
- protected static StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
- /**
* Has this component been started?
*/
protected boolean started = false;
@@ -321,14 +313,12 @@
}
if(! validated ) {
if (containerLog.isTraceEnabled()) {
- containerLog.trace(sm.getString("realmBase.authenticateFailure",
- username));
+ containerLog.trace(MESSAGES.userNotAuthenticated(username));
}
return null;
}
if (containerLog.isTraceEnabled()) {
- containerLog.trace(sm.getString("realmBase.authenticateSuccess",
- username));
+ containerLog.trace(MESSAGES.userAuthenticated(username));
}
return getPrincipal(username);
@@ -386,8 +376,7 @@
try {
valueBytes = serverDigestValue.getBytes(getDigestEncoding());
} catch (UnsupportedEncodingException uee) {
- log.error("Illegal digestEncoding: " + getDigestEncoding(), uee);
- throw new IllegalArgumentException(uee.getMessage());
+ throw MESSAGES.illegalDigestEncoding(getDigestEncoding(), uee);
}
}
@@ -397,8 +386,8 @@
serverDigest = md5Encoder.encode(md5Helper.digest(valueBytes));
}
- if (log.isDebugEnabled()) {
- log.debug("Digest : " + clientDigest + " Username:" + username
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled()) {
+ CatalinaLogger.REALM_LOGGER.debug("Digest : " + clientDigest + " Username:" + username
+ " ClientSigest:" + clientDigest + " nOnce:" + nOnce
+ " nc:" + nc + " cnonce:" + cnonce + " qop:" + qop
+ " realm:" + realm + "md5a2:" + md5a2
@@ -426,18 +415,18 @@
return (null);
// Check the validity of each certificate in the chain
- if (log.isDebugEnabled())
- log.debug("Authenticating client certificate chain");
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug("Authenticating client certificate chain");
if (validate) {
for (int i = 0; i < certs.length; i++) {
- if (log.isDebugEnabled())
- log.debug(" Checking validity for '" +
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug(" Checking validity for '" +
certs[i].getSubjectDN().getName() + "'");
try {
certs[i].checkValidity();
} catch (Exception e) {
- if (log.isDebugEnabled())
- log.debug(" Validity exception", e);
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug(" Validity exception", e);
return (null);
}
}
@@ -472,8 +461,8 @@
// Are there any defined security constraints?
SecurityConstraint constraints[] = context.findConstraints();
if ((constraints == null) || (constraints.length == 0)) {
- if (log.isDebugEnabled())
- log.debug(" No applicable constraints defined");
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug(" No applicable constraints defined");
return (null);
}
@@ -492,8 +481,8 @@
continue;
}
- if (log.isDebugEnabled()) {
- log.debug(" Checking constraint '" + constraints[i] +
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled()) {
+ CatalinaLogger.REALM_LOGGER.debug(" Checking constraint '" + constraints[i] +
"' against " + method + " " + uri + " --> " +
constraints[i].included(uri, method));
}
@@ -539,8 +528,8 @@
continue;
}
- if (log.isDebugEnabled()) {
- log.debug(" Checking constraint '" + constraints[i] +
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled()) {
+ CatalinaLogger.REALM_LOGGER.debug(" Checking constraint '" + constraints[i] +
"' against " + method + " " + uri + " --> " +
constraints[i].included(uri, method));
}
@@ -608,8 +597,8 @@
continue;
}
- if (log.isDebugEnabled()) {
- log.debug(" Checking constraint '" + constraints[i] +
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled()) {
+ CatalinaLogger.REALM_LOGGER.debug(" Checking constraint '" + constraints[i] +
"' against " + method + " " + uri + " --> " +
constraints[i].included(uri, method));
}
@@ -668,8 +657,8 @@
continue;
}
- if (log.isDebugEnabled()) {
- log.debug(" Checking constraint '" + constraints[i] +
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled()) {
+ CatalinaLogger.REALM_LOGGER.debug(" Checking constraint '" + constraints[i] +
"' against " + method + " " + uri + " --> " +
constraints[i].included(uri, method));
}
@@ -701,8 +690,8 @@
if(results == null) {
// No applicable security constraint was found
- if (log.isDebugEnabled())
- log.debug(" No applicable constraint located");
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug(" No applicable constraint located");
}
return resultsToArray(results);
}
@@ -749,19 +738,19 @@
String requestURI = request.getRequestPathMB().toString();
String loginPage = config.getLoginPage();
if (loginPage.equals(requestURI)) {
- if (log.isDebugEnabled())
- log.debug(" Allow access to login page " + loginPage);
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.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);
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.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");
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug(" Allow access to username/password submission");
return (true);
}
}
@@ -784,41 +773,41 @@
if (roles == null)
roles = new String[0];
- if (log.isDebugEnabled())
- log.debug(" Checking roles " + principal);
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug(" Checking roles " + principal);
if (roles.length == 0 && !constraint.getAllRoles()) {
if(constraint.getAuthConstraint()) {
- if( log.isDebugEnabled() )
- log.debug("No roles ");
+ if( CatalinaLogger.REALM_LOGGER.isDebugEnabled() )
+ CatalinaLogger.REALM_LOGGER.debug("No roles ");
status = false; // No listed roles means no access at all
denyFromAll = true;
break;
} else {
- if(log.isDebugEnabled())
- log.debug("Passing all access");
+ if(CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug("Passing all access");
status = true;
}
} else if (principal == null) {
- if (log.isDebugEnabled())
- log.debug(" No user authenticated, cannot grant access");
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug(" No user authenticated, cannot grant access");
} else {
for (int j = 0; j < roles.length; j++) {
if (hasRole(principal, roles[j])) {
status = true;
- if( log.isDebugEnabled() )
- log.debug( "Role found: " + roles[j]);
+ if( CatalinaLogger.REALM_LOGGER.isDebugEnabled() )
+ CatalinaLogger.REALM_LOGGER.debug( "Role found: " + roles[j]);
} else {
- if( log.isDebugEnabled() )
- log.debug( "No role found: " + roles[j]);
+ if( CatalinaLogger.REALM_LOGGER.isDebugEnabled() )
+ CatalinaLogger.REALM_LOGGER.debug( "No role found: " + roles[j]);
}
}
}
}
if (!denyFromAll && allRolesMode != AllRolesMode.STRICT_MODE && !status && principal != null) {
- if (log.isDebugEnabled()) {
- log.debug("Checking for all roles mode: " + allRolesMode);
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled()) {
+ CatalinaLogger.REALM_LOGGER.debug("Checking for all roles mode: " + allRolesMode);
}
// Check for an all roles(role-name="*")
for (int i = 0; i < constraints.length; i++) {
@@ -827,8 +816,8 @@
// If the all roles mode exists, sets
if (constraint.getAllRoles()) {
if (allRolesMode == AllRolesMode.AUTH_ONLY_MODE) {
- if (log.isDebugEnabled()) {
- log.debug("Granting access for role-name=*, auth-only");
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled()) {
+ CatalinaLogger.REALM_LOGGER.debug("Granting access for role-name=*, auth-only");
}
status = true;
break;
@@ -837,8 +826,8 @@
// For AllRolesMode.STRICT_AUTH_ONLY_MODE there must be zero roles
roles = request.getContext().findSecurityRoles();
if (roles.length == 0 && allRolesMode == AllRolesMode.STRICT_AUTH_ONLY_MODE) {
- if (log.isDebugEnabled()) {
- log.debug("Granting access for role-name=*, strict auth-only");
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled()) {
+ CatalinaLogger.REALM_LOGGER.debug("Granting access for role-name=*, strict auth-only");
}
status = true;
break;
@@ -849,9 +838,7 @@
// Return a "Forbidden" message denying access to this resource
if(!status) {
- response.sendError
- (HttpServletResponse.SC_FORBIDDEN,
- sm.getString("realmBase.forbidden"));
+ response.sendError(HttpServletResponse.SC_FORBIDDEN, MESSAGES.forbiddenAccess());
}
return status;
@@ -878,16 +865,16 @@
GenericPrincipal gp = (GenericPrincipal) principal;
if (!(gp.getRealm() == this)) {
- if(log.isDebugEnabled())
- log.debug("Different realm " + this + " " + gp.getRealm());// return (false);
+ if(CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug("Different realm " + this + " " + gp.getRealm());// return (false);
}
boolean result = gp.hasRole(role);
- if (log.isDebugEnabled()) {
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled()) {
String name = principal.getName();
if (result)
- log.debug(sm.getString("realmBase.hasRoleSuccess", name, role));
+ CatalinaLogger.REALM_LOGGER.debug(MESSAGES.userHasRole(name, role));
else
- log.debug(sm.getString("realmBase.hasRoleFailure", name, role));
+ CatalinaLogger.REALM_LOGGER.debug(MESSAGES.userDoesNotHaveRole(name, role));
}
return (result);
@@ -913,29 +900,29 @@
// Is there a relevant user data constraint?
if (constraints == null || constraints.length == 0) {
- if (log.isDebugEnabled())
- log.debug(" No applicable security constraint defined");
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug(" No applicable security constraint defined");
return (true);
}
for(int i=0; i < constraints.length; i++) {
SecurityConstraint constraint = constraints[i];
String userConstraint = constraint.getUserConstraint();
if (userConstraint == null) {
- if (log.isDebugEnabled())
- log.debug(" No applicable user data constraint defined");
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug(" No applicable user data constraint defined");
return (true);
}
if (userConstraint.equals(Constants.NONE_TRANSPORT)) {
- if (log.isDebugEnabled())
- log.debug(" User data constraint has no restrictions");
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug(" User data constraint has no restrictions");
return (true);
}
}
// Validate the request against the user data constraint
if (request.getRequest().isSecure()) {
- if (log.isDebugEnabled())
- log.debug(" User data constraint already satisfied");
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug(" User data constraint already satisfied");
return (true);
}
// Initialize variables we need to determine the appropriate action
@@ -943,8 +930,8 @@
// Is redirecting disabled?
if (redirectPort <= 0) {
- if (log.isDebugEnabled())
- log.debug(" SSL redirect is disabled");
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug(" SSL redirect is disabled");
response.sendError
(HttpServletResponse.SC_FORBIDDEN,
request.getRequestURI());
@@ -974,8 +961,8 @@
file.append('?');
file.append(queryString);
}
- if (log.isDebugEnabled())
- log.debug(" Redirecting to " + file.toString());
+ if (CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug(" Redirecting to " + file.toString());
response.sendRedirect(file.toString());
return (false);
@@ -1044,8 +1031,8 @@
// Validate and update our current component state
if (started) {
- if(log.isInfoEnabled())
- log.info(sm.getString("realmBase.alreadyStarted"));
+ if(CatalinaLogger.REALM_LOGGER.isInfoEnabled())
+ CatalinaLogger.REALM_LOGGER.info(MESSAGES.realmAlreadyStarted());
return;
}
if( !initialized ) {
@@ -1059,8 +1046,7 @@
try {
md = MessageDigest.getInstance(digest);
} catch (NoSuchAlgorithmException e) {
- throw new LifecycleException
- (sm.getString("realmBase.algorithm", digest), e);
+ throw new LifecycleException(MESSAGES.invalidMessageDigest(digest), e);
}
}
@@ -1081,8 +1067,8 @@
// Validate and update our current component state
if (!started) {
- if(log.isInfoEnabled())
- log.info(sm.getString("realmBase.notStarted"));
+ if(CatalinaLogger.REALM_LOGGER.isInfoEnabled())
+ CatalinaLogger.REALM_LOGGER.info(MESSAGES.realmNotStarted());
return;
}
lifecycle.fireLifecycleEvent(STOP_EVENT, null);
@@ -1102,10 +1088,10 @@
if ( oname!=null ) {
try {
Registry.getRegistry(null, null).unregisterComponent(oname);
- if(log.isDebugEnabled())
- log.debug( "unregistering realm " + oname );
- } catch( Exception ex ) {
- log.error( "Can't unregister realm " + oname, ex);
+ if(CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug( "unregistering realm " + oname );
+ } catch( Exception ex ) {
+ CatalinaLogger.REALM_LOGGER.failedRealmJmxUnregistration(oname, ex);
}
}
}
@@ -1141,15 +1127,14 @@
try {
bytes = credentials.getBytes(getDigestEncoding());
} catch (UnsupportedEncodingException uee) {
- log.error("Illegal digestEncoding: " + getDigestEncoding(), uee);
- throw new IllegalArgumentException(uee.getMessage());
+ throw MESSAGES.illegalDigestEncoding(getDigestEncoding(), uee);
}
}
md.update(bytes);
return (HexUtils.convert(md.digest()));
} catch (Exception e) {
- log.error(sm.getString("realmBase.digest"), e);
+ CatalinaLogger.REALM_LOGGER.errorDigestingCredentials(e);
return (credentials);
}
}
@@ -1168,8 +1153,7 @@
try {
md5Helper = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) {
- log.error("Couldn't get MD5 digest: ", e);
- throw new IllegalStateException(e.getMessage());
+ throw MESSAGES.noMD5Digest(e);
}
}
@@ -1188,8 +1172,7 @@
try {
valueBytes = digestValue.getBytes(getDigestEncoding());
} catch (UnsupportedEncodingException uee) {
- log.error("Illegal digestEncoding: " + getDigestEncoding(), uee);
- throw new IllegalArgumentException(uee.getMessage());
+ throw MESSAGES.illegalDigestEncoding(getDigestEncoding(), uee);
}
}
@@ -1286,7 +1269,7 @@
// Digest the credentials and return as hexadecimal
return (HexUtils.convert(md.digest()));
} catch(Exception ex) {
- log.error(ex);
+ CatalinaLogger.REALM_LOGGER.errorDigestingCredentials(ex);
return credentials;
}
@@ -1405,12 +1388,12 @@
host + path);
}
if( mserver.isRegistered(parent )) {
- if(log.isDebugEnabled())
- log.debug("Register with " + parent);
+ if(CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug("Register with " + parent);
mserver.setAttribute(parent, new Attribute("realm", this));
}
} catch (Exception e) {
- log.error("Parent not available yet: " + parent);
+ CatalinaLogger.REALM_LOGGER.missingParentJmxRegistration(parent, e);
}
}
@@ -1421,10 +1404,10 @@
oname=new ObjectName(cb.getDomain()+":type=Realm" +
getRealmSuffix() + cb.getContainerSuffix());
Registry.getRegistry(null, null).registerComponent(this, oname, null );
- if(log.isDebugEnabled())
- log.debug("Register Realm "+oname);
+ if(CatalinaLogger.REALM_LOGGER.isDebugEnabled())
+ CatalinaLogger.REALM_LOGGER.debug("Register Realm "+oname);
} catch (Throwable e) {
- log.error( "Can't register " + oname, e);
+ CatalinaLogger.REALM_LOGGER.failedRealmJmxRegistration(oname, e);
}
}
}
Modified: trunk/src/main/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java 2012-08-23 11:42:33 UTC (rev 2066)
+++ trunk/src/main/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java 2012-08-24 13:44:02 UTC (rev 2067)
@@ -16,6 +16,8 @@
*/
package org.apache.catalina.valves;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
import java.io.IOException;
import java.util.Enumeration;
import java.util.Map;
@@ -135,8 +137,7 @@
// Validate and update our current component state
if (started)
- throw new LifecycleException(sm
- .getString("accessLogValve.alreadyStarted"));
+ throw new LifecycleException(MESSAGES.valveAlreadyStarted());
lifecycle.fireLifecycleEvent(START_EVENT, null);
started = true;
@@ -148,8 +149,7 @@
// Validate and update our current component state
if (!started)
- throw new LifecycleException(sm
- .getString("accessLogValve.notStarted"));
+ throw new LifecycleException(MESSAGES.valveNotStarted());
lifecycle.fireLifecycleEvent(STOP_EVENT, null);
started = false;
Modified: trunk/src/main/java/org/apache/catalina/valves/SSLValve.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/valves/SSLValve.java 2012-08-23 11:42:33 UTC (rev 2066)
+++ trunk/src/main/java/org/apache/catalina/valves/SSLValve.java 2012-08-24 13:44:02 UTC (rev 2067)
@@ -29,6 +29,7 @@
import org.apache.catalina.connector.Response;
import org.apache.tomcat.util.buf.EncodingToCharset;
import org.jboss.logging.Logger;
+import org.jboss.web.CatalinaLogger;
/**
* When using mod_proxy_http, the client SSL information is not included in the
@@ -105,9 +106,9 @@
jsseCerts = new X509Certificate[1];
jsseCerts[0] = cert;
} catch (java.security.cert.CertificateException e) {
- log.warn(sm.getString("sslValve.certError", strcerts), e);
+ CatalinaLogger.VALVES_LOGGER.certificateProcessingFailed(strcerts, e);
} catch (NoSuchProviderException e) {
- log.error(sm.getString("sslValve.invalidProvider", providerName), e);
+ CatalinaLogger.VALVES_LOGGER.missingSecurityProvider(providerName, e);
}
request.setAttribute(Globals.CERTIFICATES_ATTR, jsseCerts);
}
Modified: trunk/src/main/java/org/apache/catalina/valves/ValveBase.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/valves/ValveBase.java 2012-08-23 11:42:33 UTC (rev 2066)
+++ trunk/src/main/java/org/apache/catalina/valves/ValveBase.java 2012-08-24 13:44:02 UTC (rev 2067)
@@ -80,13 +80,6 @@
protected Valve next = null;
- /**
- * The string manager for this package.
- */
- protected final static StringManager sm =
- StringManager.getManager(Constants.Package);
-
-
//-------------------------------------------------------------- Properties
Modified: trunk/src/main/java/org/jboss/web/CatalinaLogger.java
===================================================================
--- trunk/src/main/java/org/jboss/web/CatalinaLogger.java 2012-08-23 11:42:33 UTC (rev 2066)
+++ trunk/src/main/java/org/jboss/web/CatalinaLogger.java 2012-08-24 13:44:02 UTC (rev 2067)
@@ -45,4 +45,47 @@
*/
CatalinaLogger ROOT_LOGGER = Logger.getMessageLogger(CatalinaLogger.class, "org.apache.catalina");
+ /**
+ * A logger with the category of the package name.
+ */
+ CatalinaLogger AUTH_LOGGER = Logger.getMessageLogger(CatalinaLogger.class, "org.apache.catalina.authenticator");
+
+ /**
+ * A logger with the category of the package name.
+ */
+ CatalinaLogger VALVES_LOGGER = Logger.getMessageLogger(CatalinaLogger.class, "org.apache.catalina.valves");
+
+ /**
+ * A logger with the category of the package name.
+ */
+ CatalinaLogger REALM_LOGGER = Logger.getMessageLogger(CatalinaLogger.class, "org.apache.catalina.realm");
+
+ @LogMessage(level = WARN)
+ @Message(id = 1000, value = "A valid entry has been removed from client nonce cache to make room for new entries. A replay attack is now possible. To prevent the possibility of replay attacks, reduce nonceValidity or increase cnonceCacheSize. Further warnings of this type will be suppressed for 5 minutes.")
+ void digestCacheRemove();
+
+ @LogMessage(level = WARN)
+ @Message(id = 1001, value = "Failed to process certificate string [%s] to create a java.security.cert.X509Certificate object")
+ void certificateProcessingFailed(String certificate, @Cause Throwable t);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1002, value = "The SSL provider specified on the connector associated with this request of [%s] is invalid. The certificate data could not be processed.")
+ void missingSecurityProvider(String provider, @Cause Throwable t);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1003, value = "Error digesting user credentials.")
+ void errorDigestingCredentials(@Cause Throwable t);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1004, value = "Failed realm [%s] JMX registration.")
+ void failedRealmJmxRegistration(Object objectName, @Cause Throwable t);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1005, value = "Failed realm [%s] JMX unregistration.")
+ void failedRealmJmxUnregistration(Object objectName, @Cause Throwable t);
+
+ @LogMessage(level = ERROR)
+ @Message(id = 1006, value = "Missing parent [%s].")
+ void missingParentJmxRegistration(Object objectName, @Cause Throwable t);
+
}
Modified: trunk/src/main/java/org/jboss/web/CatalinaMessages.java
===================================================================
--- trunk/src/main/java/org/jboss/web/CatalinaMessages.java 2012-08-23 11:42:33 UTC (rev 2066)
+++ trunk/src/main/java/org/jboss/web/CatalinaMessages.java 2012-08-24 13:44:02 UTC (rev 2067)
@@ -22,6 +22,9 @@
package org.jboss.web;
+import java.io.UnsupportedEncodingException;
+import java.security.NoSuchAlgorithmException;
+
import org.jboss.logging.Cause;
import org.jboss.logging.Message;
import org.jboss.logging.MessageBundle;
@@ -39,4 +42,70 @@
*/
CatalinaMessages MESSAGES = Messages.getBundle(CatalinaMessages.class);
+ @Message(id = 1, value = "Configuration error: Must be attached to a Context")
+ IllegalArgumentException authenticatorNeedsContext();
+
+ @Message(id = 2, value = "Security Interceptor has already been started")
+ String authenticatorAlreadyStarted();
+
+ @Message(id = 3, value = "Security Interceptor has not yet been started")
+ String authenticatorNotStarted();
+
+ @Message(id = 4, value = "The request body was too large to be cached during the authentication process")
+ String requestBodyTooLarge();
+
+ @Message(id = 5, value = "The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser")
+ String sessionTimeoutDuringAuthentication();
+
+ @Message(id = 6, value = "Invalid direct reference to form login page")
+ String invalidFormLoginDirectReference();
+
+ @Message(id = 7, value = "Unexpected error forwarding to error page")
+ String errorForwardingToFormError();
+
+ @Message(id = 8, value = "Unexpected error forwarding to login page")
+ String errorForwardingToFormLogin();
+
+ @Message(id = 9, value = "No client certificate chain in this request")
+ String missingRequestCertificate();
+
+ @Message(id = 10, value = "Cannot authenticate with the provided credentials")
+ String certificateAuthenticationFailure();
+
+ @Message(id = 11, value = "Valve has already been started")
+ String valveAlreadyStarted();
+
+ @Message(id = 12, value = "Valve has not yet been started")
+ String valveNotStarted();
+
+ @Message(id = 13, value = "Username [%s] NOT successfully authenticated")
+ String userNotAuthenticated(String userName);
+
+ @Message(id = 14, value = "Username [%s] successfully authenticated")
+ String userAuthenticated(String userName);
+
+ @Message(id = 15, value = "Access to the requested resource has been denied")
+ String forbiddenAccess();
+
+ @Message(id = 16, value = "User [%s] does not have role [%s]")
+ String userDoesNotHaveRole(String user, String role);
+
+ @Message(id = 17, value = "User [%s] has role [%s]")
+ String userHasRole(String user, String role);
+
+ @Message(id = 18, value = "Realm has already been started")
+ String realmAlreadyStarted();
+
+ @Message(id = 19, value = "Realm has not yet been started")
+ String realmNotStarted();
+
+ @Message(id = 20, value = "Invalid message digest algorithm %s specified")
+ String invalidMessageDigest(String digest);
+
+ @Message(id = 21, value = "Illegal digest encoding %s")
+ IllegalArgumentException illegalDigestEncoding(String digest, @Cause UnsupportedEncodingException e);
+
+ @Message(id = 21, value = "Missing MD5 digest")
+ IllegalArgumentException noMD5Digest(@Cause NoSuchAlgorithmException e);
+
}
12 years, 4 months