# HG changeset patch # User Jaroslav Tulach # Date 1360952911 -3600 # Node ID 3035beed09a1b60b089779c69fc814f0f82270d7 # Parent 1343f52164f3bdf816e81d9f75378580ecb72988 Using simple name should allow us to support multiple pages in the future diff -r 1343f52164f3 -r 3035beed09a1 launcher/src/main/java/org/apidesign/bck2brwsr/launcher/Bck2BrwsrLauncher.java --- a/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/Bck2BrwsrLauncher.java Fri Feb 15 19:24:34 2013 +0100 +++ b/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/Bck2BrwsrLauncher.java Fri Feb 15 19:28:31 2013 +0100 @@ -95,10 +95,12 @@ startpage = "/" + startpage; } HttpServer s = initServer(".", true); - s.getServerConfiguration().addHttpHandler(new Page(resources, startpage), "/index.xhtml"); + int last = startpage.lastIndexOf('/'); + String simpleName = startpage.substring(last); + s.getServerConfiguration().addHttpHandler(new Page(resources, startpage), simpleName); s.getServerConfiguration().addHttpHandler(new Page(resources, null), "/"); try { - launchServerAndBrwsr(s, "/index.xhtml"); + launchServerAndBrwsr(s, simpleName); } catch (URISyntaxException | InterruptedException ex) { throw new IOException(ex); }