FAQ
Author: markt
Date: Wed Oct 29 19:57:50 2014
New Revision: 1635283

URL: http://svn.apache.org/r1635283
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
     tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java
     tomcat/trunk/test/org/apache/catalina/startup/TestTomcatClassLoader.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java?rev=1635283&r1=1635282&r2=1635283&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TestTomcat.java Wed Oct 29 19:57:50 2014
@@ -181,11 +181,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"));
- // You can customize the context by calling
- // its API
+ // No file system docBase required
+ org.apache.catalina.Context ctx = tomcat.addContext("", null);

          Tomcat.addServlet(ctx, "myServlet", new HelloWorld());
          ctx.addServletMapping("/", "myServlet");
@@ -233,11 +230,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"));
- // You can customize the context by calling
- // its API
+ // No file system docBase required
+ org.apache.catalina.Context ctx = tomcat.addContext("", null);

          Tomcat.addServlet(ctx, "myServlet", new HelloWorldSession());
          ctx.addServletMapping("/", "myServlet");
@@ -266,11 +260,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"));
-
- // You can customise the context by calling its API
+ // No file system docBase required
+ org.apache.catalina.Context ctx = tomcat.addContext("", null);

          // Enable JNDI - it is disabled by default
          tomcat.enableNaming();
@@ -297,11 +288,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"));
-
- // You can customise the context by calling its API
+ // No file system docBase required
+ org.apache.catalina.Context ctx = tomcat.addContext("", null);

          // Enable JNDI - it is disabled by default
          tomcat.enableNaming();
@@ -378,9 +366,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/trunk/test/org/apache/catalina/startup/TestTomcatClassLoader.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TestTomcatClassLoader.java?rev=1635283&r1=1635282&r2=1635283&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/startup/TestTomcatClassLoader.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TestTomcatClassLoader.java Wed Oct 29 19:57:50 2014
@@ -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");



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupdev @
categoriestomcat
postedOct 29, '14 at 7:59p
activeOct 29, '14 at 7:59p
posts1
users1
websitetomcat.apache.org
irc#tomcat

1 user in discussion

Markt: 1 post

People

Translate

site design / logo © 2017 Grokbase