Modified: tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java Wed May 27 10:11:28 2015 @@ -61,8 +61,8 @@ public class TestAbstractHttp11Processor public void testResponseWithErrorChunked() throws Exception { Tomcat tomcat = getTomcatInstance(); - // Must have a real docBase - just use temp - Context ctxt = tomcat.addContext("", System.getProperty("java.io.tmpdir")); + // No file system docBase required + Context ctxt = tomcat.addContext("", null); // Add protected servlet Tomcat.addServlet(ctxt, "ChunkedResponseWithErrorServlet", @@ -350,9 +350,8 @@ public class TestAbstractHttp11Processor public void testPipelining() throws Exception { Tomcat tomcat = getTomcatInstance(); - // Must have a real docBase - just use temp - Context ctxt = tomcat.addContext("", - System.getProperty("java.io.tmpdir")); + // No file system docBase required + Context ctxt = tomcat.addContext("", null); // Add protected servlet Tomcat.addServlet(ctxt, "TesterServlet", new TesterServlet()); @@ -411,9 +410,8 @@ public class TestAbstractHttp11Processor public void testChunking11NoContentLength() throws Exception { Tomcat tomcat = getTomcatInstance(); - // Must have a real docBase - just use temp - Context ctxt = tomcat.addContext("", - System.getProperty("java.io.tmpdir")); + // No file system docBase required + Context ctxt = tomcat.addContext("", null); Tomcat.addServlet(ctxt, "NoContentLengthFlushingServlet", new NoContentLengthFlushingServlet()); @@ -440,9 +438,8 @@ public class TestAbstractHttp11Processor Tomcat tomcat = getTomcatInstance(); - // Must have a real docBase - just use temp - Context ctxt = tomcat.addContext("", - System.getProperty("java.io.tmpdir")); + // No file system docBase required + Context ctxt = tomcat.addContext("", null); Tomcat.addServlet(ctxt, "NoContentLengthConnectionCloseFlushingServlet", new NoContentLengthConnectionCloseFlushingServlet()); @@ -482,9 +479,8 @@ public class TestAbstractHttp11Processor private void doTestBug53677(boolean flush) throws Exception { Tomcat tomcat = getTomcatInstance(); - // Must have a real docBase - just use temp - Context ctxt = tomcat.addContext("", - System.getProperty("java.io.tmpdir")); + // No file system docBase required + Context ctxt = tomcat.addContext("", null); Tomcat.addServlet(ctxt, "LargeHeaderServlet", new LargeHeaderServlet(flush)); @@ -520,9 +516,8 @@ public class TestAbstractHttp11Processor tomcat.getConnector().setProperty("processorCache", "1"); tomcat.getConnector().setProperty("maxThreads", "1"); - // Must have a real docBase - just use temp - Context ctxt = tomcat.addContext("", - System.getProperty("java.io.tmpdir")); + // No file system docBase required + Context ctxt = tomcat.addContext("", null); Tomcat.addServlet(ctxt, "async", new Bug55772Servlet()); ctxt.addServletMapping("/*", "async"); @@ -613,8 +608,8 @@ public class TestAbstractHttp11Processor private void doTestNon2xxResponseAndExpectation(boolean useExpectation) 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, "echo", new EchoBodyServlet()); ctx.addServletMapping("/echo", "echo");
Modified: tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/coyote/http11/filters/TestChunkedInputFilter.java Wed May 27 10:11:28 2015 @@ -101,9 +101,8 @@ public class TestChunkedInputFilter exte // 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); // Configure allowed trailer headers tomcat.getConnector().setProperty("allowedTrailerHeaders", "X-Trailer1,X-Trailer2"); @@ -168,9 +167,8 @@ public class TestChunkedInputFilter exte // 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 EchoHeaderServlet(false)); ctx.addServletMapping("/", "servlet"); @@ -232,9 +230,8 @@ public class TestChunkedInputFilter exte tomcat.getConnector().setProperty( "maxExtensionSize", Integer.toString(EXT_SIZE_LIMIT)); - // 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 EchoHeaderServlet(ok)); ctx.addServletMapping("/", "servlet"); @@ -281,9 +278,8 @@ public class TestChunkedInputFilter exte // 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 EchoHeaderServlet(true)); ctx.addServletMapping("/", "servlet"); @@ -381,9 +377,8 @@ public class TestChunkedInputFilter exte // 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); BodyReadServlet servlet = new BodyReadServlet(expectPass, readLimit); Tomcat.addServlet(ctx, "servlet", servlet); Modified: tomcat/tc7.0.x/trunk/test/org/apache/naming/resources/TestNamingContext.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/naming/resources/TestNamingContext.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/naming/resources/TestNamingContext.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/naming/resources/TestNamingContext.java Wed May 27 10:11:28 2015 @@ -62,10 +62,9 @@ public class TestNamingContext extends T public void doTestLookup(boolean useSingletonResource) throws Exception { Tomcat tomcat = getTomcatInstance(); tomcat.enableNaming(); - - // 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); // Create the resource ContextResource cr = new ContextResource(); @@ -255,10 +254,9 @@ public class TestNamingContext extends T public void testListBindings() throws Exception { Tomcat tomcat = getTomcatInstance(); tomcat.enableNaming(); - - // 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); // Create the resource ContextResource cr = new ContextResource(); @@ -307,10 +305,9 @@ public class TestNamingContext extends T public void testBeanFactory() throws Exception { Tomcat tomcat = getTomcatInstance(); tomcat.enableNaming(); - - // 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); // Create the resource ContextResource cr = new ContextResource(); @@ -367,10 +364,9 @@ public class TestNamingContext extends T throws Exception { Tomcat tomcat = getTomcatInstance(); tomcat.enableNaming(); - - // 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); ctx.setJndiExceptionOnFailedWrite(exceptionOnFailedWrite); @@ -427,9 +423,8 @@ public class TestNamingContext extends T Tomcat tomcat = getTomcatInstance(); tomcat.enableNaming(); - // 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); // Create the resource ContextEnvironment env = new ContextEnvironment(); Modified: tomcat/tc7.0.x/trunk/test/org/apache/naming/resources/TestProxyDirContext.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/naming/resources/TestProxyDirContext.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/naming/resources/TestProxyDirContext.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/naming/resources/TestProxyDirContext.java Wed May 27 10:11:28 2015 @@ -39,9 +39,8 @@ public class TestProxyDirContext extends public void testLookupException() throws Exception { 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); ctx.setCacheTTL(500); tomcat.start(); Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/CookiesBaseTest.java Wed May 27 10:11:28 2015 @@ -67,9 +67,8 @@ public abstract class CookiesBaseTest ex public static void addServlets(Tomcat tomcat) { - // 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, "invalid", new CookieServlet("na;me", "value")); ctx.addServletMapping("/invalid", "invalid"); Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/TestBug49158.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/TestBug49158.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/TestBug49158.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/TestBug49158.java Wed May 27 10:11:28 2015 @@ -60,9 +60,8 @@ public class TestBug49158 extends Cookie } public static void addServlets(Tomcat tomcat) { - // 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, path, new TestBug49158Servlet()); ctx.addServletMapping("/"+path, path); Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperWebapps.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperWebapps.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperWebapps.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/http/mapper/TestMapperWebapps.java Wed May 27 10:11:28 2015 @@ -45,9 +45,8 @@ public class TestMapperWebapps extends T 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, "Bug53356", new Bug53356Servlet()); ctx.addServletMapping("", "Bug53356"); Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/util/net/TesterSupport.java Wed May 27 10:11:28 2015 @@ -194,9 +194,8 @@ public final class TesterSupport { TesterSupport.initSsl(tomcat); // Need a web application with a protected and unprotected URL - // 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, "simple", new SimpleServlet()); ctx.addServletMapping("/unprotected", "simple"); Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClient.java Wed May 27 10:11:28 2015 @@ -42,9 +42,8 @@ public class TestWebSocketFrameClient ex public void testConnectToServerEndpoint() 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(TesterFirehoseServer.Config.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); @@ -85,13 +84,11 @@ public class TestWebSocketFrameClient ex Tomcat tomcat = getTomcatInstance(); // No file system docBase required - Context ctx = - tomcat.addContext("", System.getProperty("java.io.tmpdir")); + Context ctx = tomcat.addContext("", null); ctx.addApplicationListener(TesterEchoServer.Config.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); - Context ctx2 = - tomcat.addContext("/foo", System.getProperty("java.io.tmpdir")); + Context ctx2 = tomcat.addContext("/foo", null); ctx2.addApplicationListener(TesterEchoServer.Config.class.getName()); Tomcat.addServlet(ctx2, "default", new DefaultServlet()); ctx2.addServletMapping("/", "default"); Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java Wed May 27 10:11:28 2015 @@ -49,9 +49,8 @@ public class TestWebSocketFrameClientSSL public void testConnectToServerEndpointSSL() 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(TesterFirehoseServer.Config.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); @@ -107,9 +106,8 @@ public class TestWebSocketFrameClientSSL getTomcatInstance().getConnector().getProtocol().equals("HTTP/1.1")); 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(TesterFirehoseServer.Config.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsPingPongMessages.java Wed May 27 10:11:28 2015 @@ -46,9 +46,8 @@ public class TestWsPingPongMessages exte @Test public void testPingPongMessages() 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(TesterEchoServer.Config.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsRemoteEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsRemoteEndpoint.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsRemoteEndpoint.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsRemoteEndpoint.java Wed May 27 10:11:28 2015 @@ -82,9 +82,8 @@ public class TestWsRemoteEndpoint extend private void doTestWriter(Class<?> clazz, boolean useWriter) 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(TesterEchoServer.Config.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsSubprotocols.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsSubprotocols.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsSubprotocols.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsSubprotocols.java Wed May 27 10:11:28 2015 @@ -49,9 +49,8 @@ public class TestWsSubprotocols extends @Test public void testWsSubprotocols() 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(Config.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java Wed May 27 10:11:28 2015 @@ -82,9 +82,8 @@ public class TestWsWebSocketContainer ex @Test public void testConnectToServerEndpoint() 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(TesterEchoServer.Config.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); @@ -121,9 +120,8 @@ public class TestWsWebSocketContainer ex @Test(expected=javax.websocket.DeploymentException.class) public void testConnectToServerEndpointInvalidScheme() 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(TesterEchoServer.Config.class.getName()); tomcat.start(); @@ -140,9 +138,8 @@ public class TestWsWebSocketContainer ex @Test(expected=javax.websocket.DeploymentException.class) public void testConnectToServerEndpointNoHost() 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(TesterEchoServer.Config.class.getName()); tomcat.start(); @@ -207,9 +204,8 @@ public class TestWsWebSocketContainer ex boolean isTextMessage, boolean pass) 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(TesterEchoServer.Config.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); @@ -316,9 +312,8 @@ public class TestWsWebSocketContainer ex 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(BlockingConfig.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); @@ -404,9 +399,8 @@ public class TestWsWebSocketContainer ex 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(ConstantTxConfig.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); @@ -588,9 +582,8 @@ public class TestWsWebSocketContainer ex @Test public void testGetOpenSessions() 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(TesterEchoServer.Config.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); @@ -637,9 +630,8 @@ public class TestWsWebSocketContainer ex public void testSessionExpiryContainer() 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(TesterEchoServer.Config.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); @@ -695,9 +687,8 @@ public class TestWsWebSocketContainer ex public void testSessionExpirySession() 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(TesterEchoServer.Config.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); @@ -781,9 +772,8 @@ public class TestWsWebSocketContainer ex public void testConnectToServerEndpointSSL() 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(TesterEchoServer.Config.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); @@ -868,9 +858,8 @@ public class TestWsWebSocketContainer ex 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(TesterEchoServer.Config.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java Wed May 27 10:11:28 2015 @@ -68,8 +68,8 @@ public class TestEncodingDecoding extend @Test public void testProgrammaticEndPoints() 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( ProgramaticServerEndpointConfig.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); @@ -118,9 +118,8 @@ public class TestEncodingDecoding extend ServerConfigListener.setPojoClazz(Server.class); 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(ServerConfigListener.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); @@ -178,9 +177,8 @@ public class TestEncodingDecoding extend ServerConfigListener.setPojoClazz(GenericsServer.class); 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(ServerConfigListener.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); @@ -608,8 +606,8 @@ public class TestEncodingDecoding extend @Test public void testUnsupportedObject() 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(ProgramaticServerEndpointConfig.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoEndpointBase.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoEndpointBase.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoEndpointBase.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoEndpointBase.java Wed May 27 10:11:28 2015 @@ -52,9 +52,8 @@ public class TestPojoEndpointBase extend ServerConfigListener.setPojoClazz(Bug54716.class); 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(ServerConfigListener.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); @@ -84,9 +83,8 @@ public class TestPojoEndpointBase extend ServerConfigListener.setPojoClazz(OnOpenServerEndpoint.class); 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(ServerConfigListener.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoMethodMapping.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoMethodMapping.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoMethodMapping.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoMethodMapping.java Wed May 27 10:11:28 2015 @@ -55,9 +55,8 @@ public class TestPojoMethodMapping exten ServerConfigListener.setPojoClazz(Server.class); 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(ServerConfigListener.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java Wed May 27 10:11:28 2015 @@ -38,9 +38,8 @@ public class TestWsServerContainer exten @Test public void testBug54807() 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(Bug54807Config.class.getName()); Tomcat.addServlet(ctx, "default", new DefaultServlet()); ctx.addServletMapping("/", "default"); Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1681953&r1=1681952&r2=1681953&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed May 27 10:11:28 2015 @@ -73,6 +73,12 @@ <code>applyJava8u40Fix</code> attribute of the SPNEGO authenticator if necessary. (markt) </fix> + <add> + <bug>57154</bug>: Add support for web applications (Context elements) + that do not have a docBase. This is primarily for use when embedding but + it also fixes a rare issue when running the unit test. Patch provided by + Huxing Zhang. (markt) + </add> </changelog> </subsection> <subsection name="Coyote"> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
