--- a/tool/run/plugins/webserver/server.java
+++ b/tool/run/plugins/webserver/server.java
@@ -67,6 +67,31 @@
request.setAnswer(utils.html.redirect("/webserver/server", 2, message));
}
+
+ /**
+ * Opens up the web browser from the user on the front page of our software
+ * @param request the end-user request
+ */
+ public void open(WebRequest request){
+ String status = settings.read("status", "offline");
+ // if we are supposed to be offline, we can't use this thing
+ if(status.equals("offline")){
+ String message = html.h3("You need to first activate the server..");
+ request.setAnswer(utils.html.redirect("/webserver/server", 2, message));
+ return;
+ }
+
+ // get the current port number
+ String portNumber = settings.read("port", definition.portDefault);
+
+ // All checked, let's open the front page
+ utils.internet.openURL("http://localhost:" + portNumber
+ + "/webserver/intro.html");
+
+ String message = html.h3("Opening your web browser..");
+ request.setAnswer(utils.html.redirect("/webserver/server", 2, message));
+ }
+
/**
* Show the main page for the server settings
* @param request the request from the end-user