1.1 --- a/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/Bck2BrwsrLauncher.java Fri Feb 15 19:24:34 2013 +0100
1.2 +++ b/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/Bck2BrwsrLauncher.java Fri Feb 15 19:28:31 2013 +0100
1.3 @@ -95,10 +95,12 @@
1.4 startpage = "/" + startpage;
1.5 }
1.6 HttpServer s = initServer(".", true);
1.7 - s.getServerConfiguration().addHttpHandler(new Page(resources, startpage), "/index.xhtml");
1.8 + int last = startpage.lastIndexOf('/');
1.9 + String simpleName = startpage.substring(last);
1.10 + s.getServerConfiguration().addHttpHandler(new Page(resources, startpage), simpleName);
1.11 s.getServerConfiguration().addHttpHandler(new Page(resources, null), "/");
1.12 try {
1.13 - launchServerAndBrwsr(s, "/index.xhtml");
1.14 + launchServerAndBrwsr(s, simpleName);
1.15 } catch (URISyntaxException | InterruptedException ex) {
1.16 throw new IOException(ex);
1.17 }