tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1382563 - /tomcat/sandbox/trunk-resources/test/org/apache/catalina/core/TestStandardContextAliases.java
Date Sun, 09 Sep 2012 19:35:16 GMT
Author: markt
Date: Sun Sep  9 19:35:15 2012
New Revision: 1382563

URL: http://svn.apache.org/viewvc?rev=1382563&view=rev
Log:
Get test working with new Resources implementation

Modified:
    tomcat/sandbox/trunk-resources/test/org/apache/catalina/core/TestStandardContextAliases.java

Modified: tomcat/sandbox/trunk-resources/test/org/apache/catalina/core/TestStandardContextAliases.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/trunk-resources/test/org/apache/catalina/core/TestStandardContextAliases.java?rev=1382563&r1=1382562&r2=1382563&view=diff
==============================================================================
--- tomcat/sandbox/trunk-resources/test/org/apache/catalina/core/TestStandardContextAliases.java
(original)
+++ tomcat/sandbox/trunk-resources/test/org/apache/catalina/core/TestStandardContextAliases.java
Sun Sep  9 19:35:15 2012
@@ -32,8 +32,10 @@ import static org.junit.Assert.assertTru
 
 import org.junit.Test;
 
+import org.apache.catalina.WebResourceRoot;
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
+import org.apache.catalina.webresources.StandardRoot;
 import org.apache.tomcat.util.buf.ByteChunk;
 
 public class TestStandardContextAliases extends TomcatBaseTest {
@@ -47,7 +49,10 @@ public class TestStandardContextAliases 
             tomcat.addContext("", System.getProperty("java.io.tmpdir"));
 
         File lib = new File("webapps/examples/WEB-INF/lib");
-        ctx.setAliases("/WEB-INF/lib=" + lib.getCanonicalPath());
+        ctx.setResources(new StandardRoot(ctx));
+        ctx.getResources().createWebResourceSet(
+                WebResourceRoot.ResourceSetType.POST, lib, "/WEB-INF/lib", "");
+
 
         Tomcat.addServlet(ctx, "test", new TestServlet());
         ctx.addServletMapping("/", "test");



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


Mime
View raw message