Added a responder to serve static content from the classloader.
[jsvc.git] / src / dolda / jsvc / test / Bootstrap.java
1 package dolda.jsvc.test;
2
3 import dolda.jsvc.*;
4 import dolda.jsvc.util.*;
5
6 public class Bootstrap {
7     public static Responder responder() {
8         Multiplexer root = new Multiplexer();
9         root.file("test", new TestResponder());
10         root.file("", new StaticContent(Bootstrap.class, "static/index.html", false, "text/html"));
11         root.file("css", new StaticContent(Bootstrap.class, "static/test.css", false, "text/css"));
12         root.dir("foo", new StaticContent(Bootstrap.class, "static/foo", true, "text/plain; charset=utf-8"));
13         return(Misc.stdroot(root));
14     }
15 }