Author: markt
Date: Wed May 27 10:11:28 2015
New Revision: 1681953
URL: http://svn.apache.org/r1681953
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=57154
Support a null docBase
Added:
tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/EmptyDirContext.java
(with props)
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/tc7.0.x/trunk/test/javax/servlet/http/TestHttpServlet.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestDigestAuthenticator.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestFormAuthenticator.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndBasicAuthenticator.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndDigestAuthenticator.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestConnector.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestInputBuffer.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestKeepAliveCount.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestMaxConnections.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestOutputBuffer.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestRequest.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestResponse.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestApplicationContext.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestApplicationFilterConfig.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestNamingContextListener.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextValve.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardHostValve.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardWrapper.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestAddCharSetFilter.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/session/TestPersistentManager.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/session/TestStandardSession.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestListener.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcatClassLoader.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/websocket/TestWebSocket.java
tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java
tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java
tomcat/tc7.0.x/trunk/test/org/apache/naming/resources/TestNamingContext.java
tomcat/tc7.0.x/trunk/test/org/apache/naming/resources/TestProxyDirContext.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/TestBug49158.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperWebapps.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsRemoteEndpoint.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsSubprotocols.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoEndpointBase.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoMethodMapping.java
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java Wed
May 27 10:11:28 2015
@@ -120,6 +120,7 @@ import org.apache.juli.logging.LogFactor
import org.apache.naming.ContextBindings;
import org.apache.naming.resources.BaseDirContext;
import org.apache.naming.resources.DirContextURLStreamHandler;
+import org.apache.naming.resources.EmptyDirContext;
import org.apache.naming.resources.FileDirContext;
import org.apache.naming.resources.ProxyDirContext;
import org.apache.naming.resources.WARDirContext;
@@ -5316,7 +5317,9 @@ public class StandardContext extends Con
if (log.isDebugEnabled())
log.debug("Configuring default Resources");
try {
- if ((getDocBase() != null) && (getDocBase().endsWith(".war"))
&&
+ if (getDocBase() == null)
+ setResources(new EmptyDirContext());
+ else if ((getDocBase() != null) &&
(getDocBase().endsWith(".war")) &&
(!(new File(getBasePath())).isDirectory()))
setResources(new WARDirContext());
else
Added:
tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/EmptyDirContext.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/EmptyDirContext.java?rev=1681953&view=auto
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/EmptyDirContext.java
(added)
+++ tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/EmptyDirContext.java
Wed May 27 10:11:28 2015
@@ -0,0 +1,404 @@
+/*
+ * 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.naming.resources;
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Vector;
+
+import javax.naming.Binding;
+import javax.naming.CompositeName;
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NameClassPair;
+import javax.naming.NameNotFoundException;
+import javax.naming.NameParser;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.ModificationItem;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+
+/**
+ * A {@link DirContext} implementation that is not backed by a file system
+ * and behaves as if it has no resources available. This is primarily used in
+ * embedded mode when the web application is configured entirely
+ * programmatically and does not use any static resources from the file system.
+ * EmptyDirContext is implemented as a read only context.
+ *
+ * @author Huxing Zhang ([email protected])
+ */
+public class EmptyDirContext implements DirContext {
+
+ /**
+ * Static field to avoid useless object creation
+ */
+ private static final Attributes emptyAttributes = new BasicAttributes();
+
+ private static final NameNotFoundException nameNotFoundException = new
NameNotFoundException();
+
+ private static final Name emptyName = new CompositeName();
+
+ private static final Hashtable<?,?> emptyEnv = new
Hashtable<Object,Object>();
+
+ private static final String emptyString = "";
+
+ /**
+ * Non-static field to avoid useless object creation
+ */
+ @SuppressWarnings("rawtypes")
+ private final NamingEnumeration emptyEnum = new EmptyNamingEnumImpl();
+
+ private final NameParser nameParser = new NameParserImpl();
+
+ @Override
+ public Attributes getAttributes(Name name) throws NamingException {
+ return emptyAttributes;
+ }
+
+ @Override
+ public Attributes getAttributes(String name) throws NamingException {
+ return emptyAttributes;
+ }
+
+ @Override
+ public Attributes getAttributes(Name name, String[] attrIds) throws
NamingException {
+ return emptyAttributes;
+ }
+
+ @Override
+ public Attributes getAttributes(String name, String[] attrIds) throws
NamingException {
+ return emptyAttributes;
+ }
+
+ @Override
+ public void modifyAttributes(Name name, int mod_op, Attributes attrs)
throws NamingException {
+ // no op
+ }
+
+ @Override
+ public void modifyAttributes(String name, int mod_op, Attributes attrs)
throws NamingException {
+ // no op
+ }
+
+ @Override
+ public void modifyAttributes(Name name, ModificationItem[] mods) throws
NamingException {
+ // no op
+ }
+
+ @Override
+ public void modifyAttributes(String name, ModificationItem[] mods) throws
NamingException {
+ // no op
+ }
+
+ @Override
+ public void bind(Name name, Object obj, Attributes attrs) throws
NamingException {
+ // no op
+ }
+
+ @Override
+ public void bind(String name, Object obj, Attributes attrs) throws
NamingException {
+ // no op
+ }
+
+ @Override
+ public void rebind(Name name, Object obj, Attributes attrs) throws
NamingException {
+ // no op
+ }
+
+ @Override
+ public void rebind(String name, Object obj, Attributes attrs) throws
NamingException {
+ // no op
+ }
+
+ @Override
+ public DirContext createSubcontext(Name name, Attributes attrs) throws
NamingException {
+ return this;
+ }
+
+ @Override
+ public DirContext createSubcontext(String name, Attributes attrs) throws
NamingException {
+ return this;
+ }
+
+ @Override
+ public DirContext getSchema(Name name) throws NamingException {
+ return this;
+ }
+
+ @Override
+ public DirContext getSchema(String name) throws NamingException {
+ return this;
+ }
+
+ @Override
+ public DirContext getSchemaClassDefinition(Name name) throws
NamingException {
+ return this;
+ }
+
+ @Override
+ public DirContext getSchemaClassDefinition(String name) throws
NamingException {
+ return this;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public NamingEnumeration<SearchResult> search(Name name, Attributes
matchingAttributes,
+ String[] attributesToReturn) throws NamingException {
+ return emptyEnum;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public NamingEnumeration<SearchResult> search(String name, Attributes
matchingAttributes,
+ String[] attributesToReturn) throws NamingException {
+ return emptyEnum;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public NamingEnumeration<SearchResult> search(Name name, Attributes
matchingAttributes)
+ throws NamingException {
+ return emptyEnum;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public NamingEnumeration<SearchResult> search(String name, Attributes
matchingAttributes)
+ throws NamingException {
+ return emptyEnum;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public NamingEnumeration<SearchResult> search(Name name, String filter,
SearchControls cons)
+ throws NamingException {
+ return emptyEnum;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public NamingEnumeration<SearchResult> search(String name, String filter,
SearchControls cons)
+ throws NamingException {
+ return emptyEnum;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public NamingEnumeration<SearchResult> search(Name name, String filterExpr,
+ Object[] filterArgs, SearchControls cons) throws NamingException {
+ return emptyEnum;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public NamingEnumeration<SearchResult> search(String name, String
filterExpr,
+ Object[] filterArgs, SearchControls cons) throws NamingException {
+ return emptyEnum;
+ }
+
+ @Override
+ public Object lookup(Name name) throws NamingException {
+ throw nameNotFoundException;
+ }
+
+ @Override
+ public Object lookup(String name) throws NamingException {
+ throw nameNotFoundException;
+ }
+
+ @Override
+ public void bind(Name name, Object obj) throws NamingException {
+ // no op
+ }
+
+ @Override
+ public void bind(String name, Object obj) throws NamingException {
+ // no op
+ }
+
+ @Override
+ public void rebind(Name name, Object obj) throws NamingException {
+ // no op
+ }
+
+ @Override
+ public void rebind(String name, Object obj) throws NamingException {
+ // no op
+ }
+
+ @Override
+ public void unbind(Name name) throws NamingException {
+ // no op
+ }
+
+ @Override
+ public void unbind(String name) throws NamingException {
+ // no op
+ }
+
+ @Override
+ public void rename(Name oldName, Name newName) throws NamingException {
+ // no op
+ }
+
+ @Override
+ public void rename(String oldName, String newName) throws NamingException {
+ // no op
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public NamingEnumeration<NameClassPair> list(Name name) throws
NamingException {
+ return emptyEnum;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public NamingEnumeration<NameClassPair> list(String name) throws
NamingException {
+ return emptyEnum;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public NamingEnumeration<Binding> listBindings(Name name) throws
NamingException {
+ return emptyEnum;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public NamingEnumeration<Binding> listBindings(String name) throws
NamingException {
+ return emptyEnum;
+ }
+
+ @Override
+ public void destroySubcontext(Name name) throws NamingException {
+ // no op
+ }
+
+ @Override
+ public void destroySubcontext(String name) throws NamingException {
+ // no op
+ }
+
+ @Override
+ public Context createSubcontext(Name name) throws NamingException {
+ return this;
+ }
+
+ @Override
+ public Context createSubcontext(String name) throws NamingException {
+ return this;
+ }
+
+ @Override
+ public Object lookupLink(Name name) throws NamingException {
+ throw nameNotFoundException;
+ }
+
+ @Override
+ public Object lookupLink(String name) throws NamingException {
+ throw nameNotFoundException;
+ }
+
+ @Override
+ public NameParser getNameParser(Name name) throws NamingException {
+ return nameParser;
+ }
+
+ @Override
+ public NameParser getNameParser(String name) throws NamingException {
+ return nameParser;
+ }
+
+ @Override
+ public Name composeName(Name name, Name prefix) throws NamingException {
+ return emptyName;
+ }
+
+ @Override
+ public String composeName(String name, String prefix) throws
NamingException {
+ return emptyString;
+ }
+
+ @Override
+ public Object addToEnvironment(String propName, Object propVal) throws
NamingException {
+ return null;
+ }
+
+ @Override
+ public Object removeFromEnvironment(String propName) throws
NamingException {
+ return null;
+ }
+
+ @Override
+ public Hashtable<?, ?> getEnvironment() throws NamingException {
+ return emptyEnv;
+ }
+
+ @Override
+ public void close() throws NamingException {
+ // NO OP
+ }
+
+ @Override
+ public String getNameInNamespace() throws NamingException {
+ return emptyString;
+ }
+
+ class EmptyNamingEnumImpl<T> implements NamingEnumeration<T> {
+
+ Enumeration<T> elements = new Vector<T>().elements();
+
+ @Override
+ public T next() throws NamingException {
+ return nextElement();
+ }
+
+ @Override
+ public boolean hasMore() throws NamingException {
+ return hasMoreElements();
+ }
+
+ @Override
+ public void close() throws NamingException {
+ elements = null;
+ }
+
+ @Override
+ public boolean hasMoreElements() {
+ return elements.hasMoreElements();
+ }
+
+ @Override
+ public T nextElement() {
+ return elements.nextElement();
+ }
+ }
+
+ class NameParserImpl implements NameParser {
+
+ @Override
+ public Name parse(String name) throws NamingException {
+ return emptyName;
+ }
+ }
+
+}
\ No newline at end of file
Propchange:
tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/EmptyDirContext.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
tomcat/tc7.0.x/trunk/java/org/apache/naming/resources/EmptyDirContext.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: tomcat/tc7.0.x/trunk/test/javax/servlet/http/TestHttpServlet.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/javax/servlet/http/TestHttpServlet.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/javax/servlet/http/TestHttpServlet.java (original)
+++ tomcat/tc7.0.x/trunk/test/javax/servlet/http/TestHttpServlet.java Wed May
27 10:11:28 2015
@@ -38,9 +38,9 @@ public class TestHttpServlet extends Tom
public void testBug53454() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
+ // No file system docBase required
StandardContext ctx = (StandardContext)
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ tomcat.addContext("", null);
// Map the test Servlet
LargeBodyServlet largeBodyServlet = new LargeBodyServlet();
@@ -82,8 +82,7 @@ public class TestHttpServlet extends Tom
Tomcat tomcat = getTomcatInstance();
// No file system docBase required
- StandardContext ctx = (StandardContext) tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ StandardContext ctx = (StandardContext) tomcat.addContext("", null);
Bug57602ServletOuter outer = new Bug57602ServletOuter();
Tomcat.addServlet(ctx, "Bug57602ServletOuter", outer);
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestDigestAuthenticator.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestDigestAuthenticator.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestDigestAuthenticator.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestDigestAuthenticator.java
Wed May 27 10:11:28 2015
@@ -269,9 +269,8 @@ public class TestDigestAuthenticator ext
// Configure a context with digest auth and a single protected resource
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctxt = tomcat.addContext(CONTEXT_PATH,
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctxt = tomcat.addContext(CONTEXT_PATH, null);
// Add protected servlet
Tomcat.addServlet(ctxt, "TesterServlet", new TesterServlet());
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestFormAuthenticator.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestFormAuthenticator.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestFormAuthenticator.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestFormAuthenticator.java
Wed May 27 10:11:28 2015
@@ -656,8 +656,8 @@ public class TestFormAuthenticator exten
Tomcat tomcat = getTomcatInstance();
- Context ctx = tomcat.addContext(
- "", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "SelectedMethods",
new SelectedMethodsServlet());
ctx.addServletMapping("/test", "SelectedMethods");
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestNonLoginAndBasicAuthenticator.java
Wed May 27 10:11:28 2015
@@ -505,9 +505,8 @@ public class TestNonLoginAndBasicAuthent
private void setUpNonLogin() throws Exception {
- // Must have a real docBase for webapps - just use temp
- nonloginContext = tomcat.addContext(CONTEXT_PATH_NOLOGIN,
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ nonloginContext = tomcat.addContext(CONTEXT_PATH_NOLOGIN, null);
nonloginContext.setSessionTimeout(LONG_SESSION_TIMEOUT_MINS);
// Add protected servlet to the context
@@ -542,9 +541,8 @@ public class TestNonLoginAndBasicAuthent
private void setUpLogin() throws Exception {
- // Must have a real docBase for webapps - just use temp
- basicContext = tomcat.addContext(CONTEXT_PATH_LOGIN,
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ basicContext = tomcat.addContext(CONTEXT_PATH_LOGIN, null);
basicContext.setSessionTimeout(SHORT_SESSION_TIMEOUT_MINS);
// Add protected servlet to the context
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndBasicAuthenticator.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndBasicAuthenticator.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndBasicAuthenticator.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndBasicAuthenticator.java
Wed May 27 10:11:28 2015
@@ -479,9 +479,8 @@ public class TestSSOnonLoginAndBasicAuth
private void setUpNonLogin() throws Exception {
- // Must have a real docBase for webapps - just use temp
- nonloginContext = tomcat.addContext(CONTEXT_PATH_NOLOGIN,
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ nonloginContext = tomcat.addContext(CONTEXT_PATH_NOLOGIN, null);
nonloginContext.setSessionTimeout(LONG_SESSION_TIMEOUT_MINS);
// Add protected servlet to the context
@@ -518,9 +517,8 @@ public class TestSSOnonLoginAndBasicAuth
private void setUpLogin() throws Exception {
- // Must have a real docBase for webapps - just use temp
- basicContext = tomcat.addContext(CONTEXT_PATH_LOGIN,
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ basicContext = tomcat.addContext(CONTEXT_PATH_LOGIN, null);
basicContext.setSessionTimeout(SHORT_SESSION_TIMEOUT_MINS);
// Add protected servlet to the context
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndDigestAuthenticator.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndDigestAuthenticator.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndDigestAuthenticator.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/authenticator/TestSSOnonLoginAndDigestAuthenticator.java
Wed May 27 10:11:28 2015
@@ -329,9 +329,8 @@ public class TestSSOnonLoginAndDigestAut
private void setUpNonLogin(Tomcat tomcat) throws Exception {
- // Must have a real docBase for webapps - just use temp
- Context ctxt = tomcat.addContext(CONTEXT_PATH_NOLOGIN,
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctxt = tomcat.addContext(CONTEXT_PATH_NOLOGIN, null);
ctxt.setSessionTimeout(LONG_TIMEOUT_SECS);
// Add protected servlet
@@ -363,9 +362,8 @@ public class TestSSOnonLoginAndDigestAut
private void setUpDigest(Tomcat tomcat) throws Exception {
- // Must have a real docBase for webapps - just use temp
- Context ctxt = tomcat.addContext(CONTEXT_PATH_DIGEST,
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctxt = tomcat.addContext(CONTEXT_PATH_DIGEST, null);
ctxt.setSessionTimeout(SHORT_TIMEOUT_SECS);
// Add protected servlet
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/comet/TestCometProcessor.java
Wed May 27 10:11:28 2015
@@ -57,7 +57,8 @@ public class TestCometProcessor extends
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- Context root = tomcat.addContext("", TEMP_DIR);
+ // No file system docBase required
+ Context root = tomcat.addContext("", null);
Tomcat.addServlet(root, "comet", new SimpleCometServlet());
root.addServletMapping("/comet", "comet");
Tomcat.addServlet(root, "hello", new HelloWorldServlet());
@@ -124,7 +125,8 @@ public class TestCometProcessor extends
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- Context root = tomcat.addContext("", TEMP_DIR);
+ // No file system docBase required
+ Context root = tomcat.addContext("", null);
Tomcat.addServlet(root, "comet", new CometCloseServlet());
root.addServletMapping("/comet", "comet");
Tomcat.addServlet(root, "hello", new HelloWorldServlet());
@@ -195,7 +197,8 @@ public class TestCometProcessor extends
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- Context root = tomcat.addContext("", TEMP_DIR);
+ // No file system docBase required
+ Context root = tomcat.addContext("", null);
Tomcat.addServlet(root, "comet", new ConnectionCloseServlet());
root.addServletMapping("/comet", "comet");
Tomcat.addServlet(root, "hello", new HelloWorldServlet());
@@ -268,7 +271,8 @@ public class TestCometProcessor extends
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- Context root = tomcat.addContext("", TEMP_DIR);
+ // No file system docBase required
+ Context root = tomcat.addContext("", null);
Wrapper w = Tomcat.addServlet(root, "comet", new SimpleCometServlet());
if (initParam != null) {
w.addInitParameter(initParam, "true");
@@ -363,7 +367,8 @@ public class TestCometProcessor extends
// Setup Tomcat instance
SimpleCometServlet servlet = new SimpleCometServlet();
Tomcat tomcat = getTomcatInstance();
- Context root = tomcat.addContext("", TEMP_DIR);
+ // No file system docBase required
+ Context root = tomcat.addContext("", null);
Tomcat.addServlet(root, "comet", servlet);
root.addServletMapping("/", "comet");
tomcat.start();
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestConnector.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestConnector.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestConnector.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestConnector.java
Wed May 27 10:11:28 2015
@@ -39,7 +39,8 @@ public class TestConnector extends Tomca
public void testStop() throws Exception {
Tomcat tomcat = getTomcatInstance();
- Context root = tomcat.addContext("", TEMP_DIR);
+ // No file system docBase required
+ Context root = tomcat.addContext("", null);
Wrapper w =
Tomcat.addServlet(root, "tester", new TesterServlet());
w.setAsyncSupported(true);
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java
Wed May 27 10:11:28 2015
@@ -131,9 +131,8 @@ public class TestCoyoteAdapter extends T
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "servlet", new PathParamServlet());
ctx.addServletMapping("/", "servlet");
@@ -185,9 +184,8 @@ public class TestCoyoteAdapter extends T
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("/testapp",
System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("/testapp", null);
Tomcat.addServlet(ctx, "servlet", new PathParamServlet());
ctx.addServletMapping("*.txt", "servlet");
@@ -236,9 +234,8 @@ public class TestCoyoteAdapter extends T
tomcat.getConnector().setURIEncoding(encoding);
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
PathInfoServlet servlet = new PathInfoServlet();
Tomcat.addServlet(ctx, "servlet", servlet);
@@ -278,9 +275,8 @@ public class TestCoyoteAdapter extends T
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
AsyncServlet servlet = new AsyncServlet();
Wrapper w = Tomcat.addServlet(ctx, "async", servlet);
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestInputBuffer.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestInputBuffer.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestInputBuffer.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestInputBuffer.java
Wed May 27 10:11:28 2015
@@ -42,7 +42,8 @@ public class TestInputBuffer extends Tom
@Test
public void testUtf8Body() throws Exception {
Tomcat tomcat = getTomcatInstance();
- Context root = tomcat.addContext("", TEMP_DIR);
+ // No file system docBase required
+ Context root = tomcat.addContext("", null);
Tomcat.addServlet(root, "Echo", new Utf8Echo());
root.addServletMapping("/test", "Echo");
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestKeepAliveCount.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestKeepAliveCount.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestKeepAliveCount.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestKeepAliveCount.java
Wed May 27 10:11:28 2015
@@ -56,7 +56,8 @@ public class TestKeepAliveCount extends
if (init) return;
Tomcat tomcat = getTomcatInstance();
- Context root = tomcat.addContext("", TEMP_DIR);
+ // No file system docBase required
+ Context root = tomcat.addContext("", null);
Tomcat.addServlet(root, "Simple", new SimpleServlet());
root.addServletMapping("/test", "Simple");
tomcat.getConnector().setProperty("maxKeepAliveRequests", "5");
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestMaxConnections.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestMaxConnections.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestMaxConnections.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestMaxConnections.java
Wed May 27 10:11:28 2015
@@ -70,7 +70,8 @@ public class TestMaxConnections extends
private synchronized void init() throws Exception {
Tomcat tomcat = getTomcatInstance();
- Context root = tomcat.addContext("", SimpleHttpClient.TEMP_DIR);
+ // No file system docBase required
+ Context root = tomcat.addContext("", null);
Tomcat.addServlet(root, "Simple", new SimpleServlet());
root.addServletMapping("/test", "Simple");
tomcat.getConnector().setProperty("maxKeepAliveRequests", "1");
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestOutputBuffer.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestOutputBuffer.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestOutputBuffer.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestOutputBuffer.java
Wed May 27 10:11:28 2015
@@ -39,7 +39,8 @@ public class TestOutputBuffer extends To
public void testWriteSpeed() throws Exception {
Tomcat tomcat = getTomcatInstance();
- Context root = tomcat.addContext("", TEMP_DIR);
+ // No file system docBase required
+ Context root = tomcat.addContext("", null);
for (int i = 1; i <= WritingServlet.EXPECTED_CONTENT_LENGTH; i*=10) {
WritingServlet servlet = new WritingServlet(i);
@@ -74,7 +75,8 @@ public class TestOutputBuffer extends To
public void testBug52577() throws Exception {
Tomcat tomcat = getTomcatInstance();
- Context root = tomcat.addContext("", TEMP_DIR);
+ // No file system docBase required
+ Context root = tomcat.addContext("", null);
Bug52577Servlet bug52577 = new Bug52577Servlet();
Tomcat.addServlet(root, "bug52577", bug52577);
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestRequest.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestRequest.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestRequest.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestRequest.java
Wed May 27 10:11:28 2015
@@ -175,7 +175,8 @@ public class TestRequest extends TomcatB
if (init) return;
Tomcat tomcat = getTomcatInstance();
- Context root = tomcat.addContext("", TEMP_DIR);
+ // No file system docBase required
+ Context root = tomcat.addContext("", null);
Tomcat.addServlet(root, "Bug37794", new Bug37794Servlet());
root.addServletMapping("/test", "Bug37794");
@@ -272,9 +273,8 @@ public class TestRequest extends TomcatB
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
// Add the Servlet
Tomcat.addServlet(ctx, "servlet", new EchoQueryStringServlet());
@@ -317,9 +317,8 @@ public class TestRequest extends TomcatB
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
LoginConfig config = new LoginConfig();
config.setAuthMethod("BASIC");
@@ -371,8 +370,8 @@ public class TestRequest extends TomcatB
@Test
public void testBug49424NoChunking() throws Exception {
Tomcat tomcat = getTomcatInstance();
- Context root = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context root = tomcat.addContext("", null);
Tomcat.addServlet(root, "Bug37794", new Bug37794Servlet());
root.addServletMapping("/", "Bug37794");
tomcat.start();
@@ -385,8 +384,8 @@ public class TestRequest extends TomcatB
@Test
public void testBug49424WithChunking() throws Exception {
Tomcat tomcat = getTomcatInstance();
- Context root = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context root = tomcat.addContext("", null);
Tomcat.addServlet(root, "Bug37794", new Bug37794Servlet());
root.addServletMapping("/", "Bug37794");
tomcat.start();
@@ -477,8 +476,8 @@ public class TestRequest extends TomcatB
@Test
public void testBug54984() throws Exception {
Tomcat tomcat = getTomcatInstance();
- Context root = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context root = tomcat.addContext("", null);
root.setAllowCasualMultipartParsing(true);
Tomcat.addServlet(root, "Bug54984", new Bug54984Servlet());
root.addServletMapping("/", "Bug54984");
@@ -555,7 +554,8 @@ public class TestRequest extends TomcatB
if (init) return;
Tomcat tomcat = getTomcatInstance();
- Context root = tomcat.addContext("", TEMP_DIR);
+ // No file system docBase required
+ Context root = tomcat.addContext("", null);
Tomcat.addServlet(root, "EchoParameters", new
EchoParametersServlet());
root.addServletMapping("/echo", "EchoParameters");
tomcat.start();
@@ -818,9 +818,8 @@ public class TestRequest extends TomcatB
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx = tomcat.addContext(deployPath,
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext(deployPath, null);
Tomcat.addServlet(ctx, "servlet", new Bug56501Servelet());
ctx.addServletMapping("/*", "servlet");
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestResponse.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestResponse.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestResponse.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestResponse.java
Wed May 27 10:11:28 2015
@@ -17,7 +17,6 @@
package org.apache.catalina.connector;
-import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
@@ -51,9 +50,8 @@ public class TestResponse extends Tomcat
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "servlet", new Bug49598Servlet());
ctx.addServletMapping("/", "servlet");
@@ -108,9 +106,8 @@ public class TestResponse extends Tomcat
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "servlet", new CharsetServlet());
ctx.addServletMapping("/", "servlet");
@@ -148,9 +145,8 @@ public class TestResponse extends Tomcat
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "servlet", new Bug52811Servlet());
ctx.addServletMapping("/", "servlet");
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestApplicationContext.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestApplicationContext.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestApplicationContext.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestApplicationContext.java
Wed May 27 10:11:28 2015
@@ -171,10 +171,12 @@ public class TestApplicationContext exte
foo2.addLifecycleListener(new SetIdListener("foo2"));
tomcat.getHost().addChild(foo2);
- Context bar = tomcat.addContext("/bar",
System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context bar = tomcat.addContext("/bar", null);
bar.addLifecycleListener(new SetIdListener("bar"));
- Context ctx = tomcat.addContext("",
System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
ctx.addLifecycleListener(new SetIdListener("ROOT"));
ctx.setCrossContext(true);
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestApplicationFilterConfig.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestApplicationFilterConfig.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestApplicationFilterConfig.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestApplicationFilterConfig.java
Wed May 27 10:11:28 2015
@@ -37,9 +37,8 @@ public class TestApplicationFilterConfig
public void testBug54170() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "HelloWorld", new HelloWorldServlet());
ctx.addServletMapping("/", "HelloWorld");
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java
Wed May 27 10:11:28 2015
@@ -16,7 +16,6 @@
*/
package org.apache.catalina.core;
-import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
@@ -87,9 +86,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Bug49528Servlet servlet = new Bug49528Servlet();
@@ -125,9 +123,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Bug49567Servlet servlet = new Bug49567Servlet();
@@ -168,9 +165,8 @@ public class TestAsyncContextImpl extend
tomcat.getConnector().setAttribute(
"connectionTimeout", Integer.valueOf(3000));
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
AsyncStartNoCompleteServlet servlet =
new AsyncStartNoCompleteServlet();
@@ -208,9 +204,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
AsyncStartWithCompleteServlet servlet =
new AsyncStartWithCompleteServlet();
@@ -466,10 +461,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
-
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
TimeoutServlet timeout = new TimeoutServlet(completeOnTimeout,
dispatchUrl);
@@ -624,10 +617,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
-
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
DispatchingServlet dispatch = new DispatchingServlet(false, false);
Wrapper wrapper = Tomcat.addServlet(ctx, "dispatch", dispatch);
@@ -745,10 +736,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
-
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
TrackingServlet tracking = new TrackingServlet();
Wrapper wrapper = Tomcat.addServlet(ctx, "tracking", tracking);
@@ -969,10 +958,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
-
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
DispatchingServlet dispatch =
new DispatchingServlet(true, completeOnError);
@@ -1050,10 +1037,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
-
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
AsyncStartRunnable servlet = new AsyncStartRunnable();
Wrapper wrapper = Tomcat.addServlet(ctx, "servlet", servlet);
@@ -1119,9 +1104,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Bug50753Servlet servlet = new Bug50753Servlet();
@@ -1184,10 +1168,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
-
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
ErrorServlet error = new ErrorServlet();
Tomcat.addServlet(ctx, "error", error);
@@ -1220,10 +1202,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
-
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
AsyncStatusServlet asyncStatusServlet =
new AsyncStatusServlet(HttpServletResponse.SC_BAD_REQUEST);
@@ -1300,10 +1280,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
-
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
AsyncErrorServlet asyncErrorServlet =
new AsyncErrorServlet(HttpServletResponse.SC_BAD_REQUEST,
threaded);
@@ -1419,10 +1397,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
-
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Wrapper a = Tomcat.addServlet(ctx, "ServletA", new Bug53337ServletA());
a.setAsyncSupported(true);
Wrapper b = Tomcat.addServlet(ctx, "ServletB", new Bug53337ServletB());
@@ -1500,10 +1476,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
-
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Bug53843ServletA servletA = new Bug53843ServletA();
Wrapper a = Tomcat.addServlet(ctx, "ServletA", servletA);
a.setAsyncSupported(true);
@@ -1614,10 +1588,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
-
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
TimeoutServlet timeout = new TimeoutServlet(null, null);
Wrapper w1 = Tomcat.addServlet(ctx, "time", timeout);
@@ -1745,10 +1717,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
-
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Bug54178ServletA bug54178ServletA = new Bug54178ServletA();
Wrapper wrapper =
@@ -1850,10 +1820,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
-
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
NonAsyncServlet nonAsyncServlet = new NonAsyncServlet();
Wrapper wrapper = Tomcat.addServlet(ctx, "nonAsyncServlet",
@@ -2002,10 +1970,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
-
- Context ctx = tomcat.addContext(contextPath,
docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext(contextPath, null);
DispatchingGenericServlet dispatch = new DispatchingGenericServlet();
Wrapper wrapper = Tomcat.addServlet(ctx, "dispatch", dispatch);
@@ -2054,9 +2020,8 @@ public class TestAsyncContextImpl extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
AsyncISEServlet servlet = new AsyncISEServlet();
@@ -2125,8 +2090,7 @@ public class TestAsyncContextImpl extend
Tomcat tomcat = getTomcatInstance();
// No file system docBase required
- File docBase = new File(System.getProperty("java.io.tmpdir"));
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ Context ctx = tomcat.addContext("", null);
Servlet stage1 = new DispatchingServletTracking("/stage2", true);
Wrapper wrapper1 = Tomcat.addServlet(ctx, "stage1", stage1);
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestNamingContextListener.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestNamingContextListener.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestNamingContextListener.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestNamingContextListener.java
Wed May 27 10:11:28 2015
@@ -48,9 +48,8 @@ public class TestNamingContextListener e
public void testBug49132() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- org.apache.catalina.Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ org.apache.catalina.Context ctx = tomcat.addContext("", null);
// Enable JNDI - it is disabled by default
tomcat.enableNaming();
@@ -96,9 +95,8 @@ public class TestNamingContextListener e
public void testBug54096() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- org.apache.catalina.Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ org.apache.catalina.Context ctx = tomcat.addContext("", null);
// Enable JNDI - it is disabled by default
tomcat.enableNaming();
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContext.java
Wed May 27 10:11:28 2015
@@ -418,9 +418,8 @@ public class TestStandardContext extends
// Set up a container
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
// Setup realm
MapRealm realm = new MapRealm();
@@ -501,9 +500,8 @@ public class TestStandardContext extends
// Set up a container
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
// Add ServletContainerInitializer
Bug51376SCI sci = new Bug51376SCI(loadOnStartUp);
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextValve.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextValve.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextValve.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardContextValve.java
Wed May 27 10:11:28 2015
@@ -16,7 +16,6 @@
*/
package org.apache.catalina.core;
-import java.io.File;
import java.io.IOException;
import javax.servlet.ServletException;
@@ -43,9 +42,8 @@ public class TestStandardContextValve ex
// Set up a container
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
// Traces order of events across multiple components
StringBuilder trace = new StringBuilder();
@@ -90,9 +88,8 @@ public class TestStandardContextValve ex
// Set up a container
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
// Traces order of events across multiple components
StringBuilder trace = new StringBuilder();
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardHostValve.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardHostValve.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardHostValve.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardHostValve.java
Wed May 27 10:11:28 2015
@@ -45,9 +45,8 @@ public class TestStandardHostValve exten
// Set up a container
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
// Add the error page
Tomcat.addServlet(ctx, "error", new ErrorServlet());
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardWrapper.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardWrapper.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardWrapper.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestStandardWrapper.java
Wed May 27 10:11:28 2015
@@ -199,9 +199,8 @@ public class TestStandardWrapper extends
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Servlet s = new DenyAllServlet();
ServletContainerInitializer sci = new SCI(s, useCreateServlet);
@@ -228,9 +227,8 @@ public class TestStandardWrapper extends
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Wrapper wrapper = Tomcat.addServlet(ctx, "servlet", servletClassName);
wrapper.setAsyncSupported(true);
@@ -366,9 +364,8 @@ public class TestStandardWrapper extends
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- StandardContext ctx = (StandardContext)
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ StandardContext ctx = (StandardContext) tomcat.addContext("", null);
Tomcat.addServlet(ctx, "Bug51445", new Bug51445Servlet());
ctx.addServletMapping("/", "Bug51445");
@@ -410,9 +407,8 @@ public class TestStandardWrapper extends
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- StandardContext ctx = (StandardContext)
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ StandardContext ctx = (StandardContext) tomcat.addContext("", null);
StandardWrapper wrapper = new StandardWrapper();
wrapper.setServletName("Bug51445");
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestAddCharSetFilter.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestAddCharSetFilter.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestAddCharSetFilter.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/filters/TestAddCharSetFilter.java
Wed May 27 10:11:28 2015
@@ -91,9 +91,8 @@ public class TestAddCharSetFilter extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
// Add the Servlet
CharsetServlet servlet = new CharsetServlet(mode);
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderExecutorMemoryLeak.java
Wed May 27 10:11:28 2015
@@ -41,9 +41,8 @@ public class TestWebappClassLoaderExecut
public void testTimerThreadLeak() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
if (ctx instanceof StandardContext) {
((StandardContext) ctx).setClearReferencesStopThreads(true);
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
Wed May 27 10:11:28 2015
@@ -40,9 +40,8 @@ public class TestWebappClassLoaderMemory
public void testTimerThreadLeak() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
if (ctx instanceof StandardContext) {
((StandardContext) ctx).setClearReferencesStopTimerThreads(true);
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java
Wed May 27 10:11:28 2015
@@ -64,9 +64,8 @@ public class TestWebappClassLoaderThread
tomcat.getServer().addLifecycleListener(
new JreMemoryLeakPreventionListener());
- // Must have a real docBase - just use temp
- Context ctx = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "leakServlet1",
"org.apache.tomcat.unittest.TesterLeakingServlet1");
@@ -121,9 +120,8 @@ public class TestWebappClassLoaderThread
tomcat.getServer().addLifecycleListener(
new JreMemoryLeakPreventionListener());
- // Must have a real docBase - just use temp
- Context ctx = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "leakServlet2",
"org.apache.tomcat.unittest.TesterLeakingServlet2");
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/session/TestPersistentManager.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/session/TestPersistentManager.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/session/TestPersistentManager.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/session/TestPersistentManager.java
Wed May 27 10:11:28 2015
@@ -168,9 +168,8 @@ public class TestPersistentManager exten
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "DummyServlet", new DummyServlet());
ctx.addServletMapping("/dummy", "DummyServlet");
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/session/TestStandardSession.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/session/TestStandardSession.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/session/TestStandardSession.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/session/TestStandardSession.java
Wed May 27 10:11:28 2015
@@ -53,8 +53,8 @@ public class TestStandardSession extends
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx = tomcat.addContext("",
System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "bug56578", new Bug56578Servlet());
ctx.addServletMapping("/bug56578", "bug56578");
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestListener.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestListener.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestListener.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestListener.java Wed
May 27 10:11:28 2015
@@ -42,8 +42,8 @@ public class TestListener extends Tomcat
public void testServletContainerInitializer() throws Exception {
Tomcat tomcat = getTomcatInstance();
- Context context = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context context = tomcat.addContext("", null);
context.addServletContainerInitializer(new SCI(), null);
tomcat.start();
@@ -59,8 +59,8 @@ public class TestListener extends Tomcat
public void testServletContextListener() throws Exception {
Tomcat tomcat = getTomcatInstance();
- Context context = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context context = tomcat.addContext("", null);
// SCL2 pretends to be in web.xml, and tries to install a
// ServletContainerInitializer.
Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcat.java Wed
May 27 10:11:28 2015
@@ -245,9 +245,8 @@ public class TestTomcat extends TomcatBa
public void testProgrammatic() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- org.apache.catalina.Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ org.apache.catalina.Context ctx = tomcat.addContext("", null);
// You can customize the context by calling
// its API
@@ -294,9 +293,8 @@ public class TestTomcat extends TomcatBa
public void testSession() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- org.apache.catalina.Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ org.apache.catalina.Context ctx = tomcat.addContext("", null);
// You can customize the context by calling
// its API
@@ -327,9 +325,8 @@ public class TestTomcat extends TomcatBa
public void testEnableNaming() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- org.apache.catalina.Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ org.apache.catalina.Context ctx = tomcat.addContext("", null);
// You can customise the context by calling its API
@@ -358,9 +355,8 @@ public class TestTomcat extends TomcatBa
public void testEnableNamingGlobal() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- org.apache.catalina.Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ org.apache.catalina.Context ctx = tomcat.addContext("", null);
// You can customise the context by calling its API
@@ -438,9 +434,8 @@ public class TestTomcat extends TomcatBa
public void testBug53301() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- org.apache.catalina.Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ org.apache.catalina.Context ctx = tomcat.addContext("", null);
InitCount initCount = new InitCount();
Tomcat.addServlet(ctx, "initCount", initCount);
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcatClassLoader.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcatClassLoader.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcatClassLoader.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestTomcatClassLoader.java
Wed May 27 10:11:28 2015
@@ -40,9 +40,8 @@ public class TestTomcatClassLoader exten
public void testDefaultClassLoader() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "ClassLoaderReport", new
ClassLoaderReport(null));
ctx.addServletMapping("/", "ClassLoaderReport");
@@ -64,9 +63,8 @@ public class TestTomcatClassLoader exten
Tomcat tomcat = getTomcatInstance();
tomcat.getServer().setParentClassLoader(cl);
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "ClassLoaderReport", new ClassLoaderReport(cl));
ctx.addServletMapping("/", "ClassLoaderReport");
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
---
tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java
(original)
+++
tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java
Wed May 27 10:11:28 2015
@@ -16,7 +16,6 @@
*/
package org.apache.catalina.valves;
-import java.io.File;
import java.io.IOException;
import javax.servlet.AsyncContext;
@@ -41,9 +40,8 @@ public class TestErrorReportValve extend
public void testBug53071() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "errorServlet", new ErrorServlet());
ctx.addServletMapping("/", "errorServlet");
@@ -75,9 +73,8 @@ public class TestErrorReportValve extend
public void testBug54220DoNotSetNotFound() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "bug54220", new Bug54220Servlet(false));
ctx.addServletMapping("/", "bug54220");
@@ -96,9 +93,8 @@ public class TestErrorReportValve extend
public void testBug54220SetNotFound() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "bug54220", new Bug54220Servlet(true));
ctx.addServletMapping("/", "bug54220");
@@ -141,9 +137,8 @@ public class TestErrorReportValve extend
public void testBug54536() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "bug54536", new Bug54536Servlet());
ctx.addServletMapping("/", "bug54536");
@@ -178,10 +173,8 @@ public class TestErrorReportValve extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
-
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Bug56042Servlet bug56042Servlet = new Bug56042Servlet();
Wrapper wrapper =
Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/websocket/TestWebSocket.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/websocket/TestWebSocket.java?rev=1681953&r1=1681952&r2=1681953&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/websocket/TestWebSocket.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/websocket/TestWebSocket.java
Wed May 27 10:11:28 2015
@@ -68,9 +68,8 @@ public class TestWebSocket extends Tomca
@Test
public void testSimple() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
ctx.addApplicationListener(new ApplicationListener(
TesterEchoServer.Config.class.getName(), false));
@@ -114,9 +113,8 @@ public class TestWebSocket extends Tomca
@Test
public void testDetectWrongVersion() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
ctx.addApplicationListener(new ApplicationListener(
TesterEchoServer.Config.class.getName(), false));
@@ -157,9 +155,8 @@ public class TestWebSocket extends Tomca
@Test
public void testNoConnection() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
ctx.addApplicationListener(new ApplicationListener(
TesterEchoServer.Config.class.getName(), false));
@@ -191,9 +188,8 @@ public class TestWebSocket extends Tomca
@Test
public void testNoUpgrade() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
ctx.addApplicationListener(new ApplicationListener(
TesterEchoServer.Config.class.getName(), false));
@@ -226,9 +222,8 @@ public class TestWebSocket extends Tomca
@Test
public void testKey() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx = tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
ctx.addApplicationListener(new ApplicationListener(
TesterEchoServer.Config.class.getName(), false));
@@ -283,9 +278,8 @@ public class TestWebSocket extends Tomca
Tomcat tomcat = getTomcatInstance();
tomcat.enableNaming();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "Bug53339", new Bug53339Servlet());
ctx.addServletMapping("/*", "Bug53339");
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]