hostConfig.undeploy=Undeploying context [{0}]
hostConfig.undeploy.error=Error undeploying web application at context path {0}
hostConfig.undeploying=Undeploying deployed web applications
-jarScan.classloaderFail=Failed to scan [{0}] from classloader hierarchy
-jarScan.classloaderStart=Scanning for JARs in classloader hierarchy
-jarScan.jarUrlStart=Scanning JAR at URL [{0}]
-jarScan.webinflibFail=Failed to scan JAR [{0}] from WEB-INF/lib
-jarScan.webinflibStart=Scanning WEB-INF/lib for JARs
tldConfig.addListeners=Adding {0} listeners from TLD files
tldConfig.cce=Lifecycle event data object {0} is not a Context
tldConfig.dirFail=Failed to process directory [{0}] for TLD files
jsp.error.tag.conflict.trimdirectivewhitespaces=Tag directive: illegal to have multiple occurrences of 'trimDirectiveWhitespaces' with different values (old: {0}, new: {1})
# JarScanner
-jsp.warning.noJarScanner=Warning: No org.apache.tomcat.JarScanner set in ServletContext. Falling back to internal JarScanner implementation.
-jsp.jarScan.webinflibStart=Scanning WEB-INF/lib for JARs
-jsp.jarScan.webinflibFail=Failed to scan JAR [{0}] from WEB-INF/lib
-jsp.jarScan.classloaderStart=Scanning for JARs in classloader hierarchy
-jsp.jarScan.classloaderFail=Failed to scan [{0}] from classloader hierarchy
-jsp.jarScan.jarUrlStart=Scanning JAR at URL [{0}]
+jsp.warning.noJarScanner=Warning: No org.apache.tomcat.JarScanner set in ServletContext. Falling back to default JarScanner implementation.
--- /dev/null
+/*
+ * 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.tomcat.util.scan;
+
+/**
+ * String constants for the scan package.
+ */
+public final class Constants {
+
+ public static final String Package = "org.apache.tomcat.util.scan";
+
+ public static final String SKIP_JARS_PROPERTY =
+ "tomcat.util.scan.DefaultJarScanner.jarsToSkip";
+
+ public static final String JAR_EXT = ".jar";
+ public static final String WEB_INF_LIB = "/WEB-INF/lib/";
+
+
+}
import javax.servlet.ServletContext;
-import org.apache.catalina.startup.Constants;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.JarScanner;
*/
public class DefaultJarScanner implements JarScanner {
- public static final String SKIP_JARS_PROPERTY =
- "tomcat.util.scan.DefaultJarScanner.jarsToSkip";
-
- private static final String JAR_EXT = ".jar";
- private static final String WEB_INF_LIB = "/WEB-INF/lib/";
-
private static final Log log = LogFactory.getLog(DefaultJarScanner.class);
private static final Set<String> defaultJarsToSkip = new HashSet<String>();
StringManager.getManager(Constants.Package);
static {
- String jarList = System.getProperty(SKIP_JARS_PROPERTY);
+ String jarList = System.getProperty(Constants.SKIP_JARS_PROPERTY);
if (jarList != null) {
StringTokenizer tokenizer = new StringTokenizer(jarList, ",");
while (tokenizer.hasMoreElements()) {
}
// Scan WEB-INF/lib
- Set<String> dirList = context.getResourcePaths(WEB_INF_LIB);
+ Set<String> dirList = context.getResourcePaths(Constants.WEB_INF_LIB);
if (dirList != null) {
Iterator<String> it = dirList.iterator();
while (it.hasNext()) {
String path = it.next();
- if (path.endsWith(JAR_EXT) &&
+ if (path.endsWith(Constants.JAR_EXT) &&
!ignoredJars.contains(
path.substring(path.lastIndexOf('/')+1))) {
// Need to scan this JAR
// in WEB-INF/lib we have already scanned
if (!(ignoredJars.contains(jarName) ||
urls[i].toString().contains(
- WEB_INF_LIB + jarName))) {
+ Constants.WEB_INF_LIB + jarName))) {
try {
process(callback, urls[i]);
} catch (IOException ioe) {
} else {
String urlStr = url.toString();
if (urlStr.startsWith("file:") || urlStr.startsWith("jndi:")) {
- if (urlStr.endsWith(JAR_EXT)) {
+ if (urlStr.endsWith(Constants.JAR_EXT)) {
URL jarURL = new URL("jar:" + urlStr + "!/");
callback.scan((JarURLConnection) jarURL.openConnection());
} else {
String name = null;
String path = url.getPath();
- int end = path.indexOf(JAR_EXT);
+ int end = path.indexOf(Constants.JAR_EXT);
if (end != -1) {
int start = path.lastIndexOf('/', end);
name = path.substring(start + 1, end + 4);
--- /dev/null
+# 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.
+
+jarScan.classloaderFail=Failed to scan [{0}] from classloader hierarchy
+jarScan.classloaderStart=Scanning for JARs in classloader hierarchy
+jarScan.jarUrlStart=Scanning JAR at URL [{0}]
+jarScan.webinflibFail=Failed to scan JAR [{0}] from WEB-INF/lib
+jarScan.webinflibStart=Scanning WEB-INF/lib for JARs