FAQ
Author: markt
Date: Wed Oct 29 20:10:49 2014
New Revision: 1635291

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

Modified:
     tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java
     tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoEndpointBase.java
     tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoMethodMapping.java
     tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java

Modified: tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java?rev=1635291&r1=1635290&r2=1635291&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java Wed Oct 29 20:10:49 2014
@@ -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());
          ctx.addServletMapping("/", "default");
@@ -117,9 +117,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");
@@ -177,9 +176,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");
@@ -603,8 +601,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/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoEndpointBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoEndpointBase.java?rev=1635291&r1=1635290&r2=1635291&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoEndpointBase.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoEndpointBase.java Wed Oct 29 20:10:49 2014
@@ -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/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoMethodMapping.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoMethodMapping.java?rev=1635291&r1=1635290&r2=1635291&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoMethodMapping.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestPojoMethodMapping.java Wed Oct 29 20:10:49 2014
@@ -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/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java?rev=1635291&r1=1635290&r2=1635291&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java Wed Oct 29 20:10:49 2014
@@ -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");



---------------------------------------------------------------------
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 8:11p
activeOct 29, '14 at 8:11p
posts1
users1
websitetomcat.apache.org
irc#tomcat

1 user in discussion

Markt: 1 post

People

Translate

site design / logo © 2017 Grokbase