Added a responder to serve static content from the classloader.
[jsvc.git] / src / dolda / jsvc / test / Bootstrap.java
index eb73996..ad4c38f 100644 (file)
@@ -5,6 +5,11 @@ import dolda.jsvc.util.*;
 
 public class Bootstrap {
     public static Responder responder() {
-       return(new ErrorHandler(new Rehandler(new TestResponder())));
+       Multiplexer root = new Multiplexer();
+       root.file("test", new TestResponder());
+       root.file("", new StaticContent(Bootstrap.class, "static/index.html", false, "text/html"));
+       root.file("css", new StaticContent(Bootstrap.class, "static/test.css", false, "text/css"));
+       root.dir("foo", new StaticContent(Bootstrap.class, "static/foo", true, "text/plain; charset=utf-8"));
+       return(Misc.stdroot(root));
     }
 }