branch develop updated (b64d6ae -> befcd04)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository nuiton-web. See https://gitlab.nuiton.org/nuiton/nuiton-web.git from b64d6ae Update and fix documentation on JettyRunner (Fixes #4126) new befcd04 Add an extra «--start» option in JettyRuner to add extra suffix to url to open in browser (Fixes #4127) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit befcd0434efb258cf5280330fa17d769c2d64515 Author: Tony CHEMIT <dev@tchemit.fr> Date: Thu Jan 5 18:44:48 2017 +0100 Add an extra «--start» option in JettyRuner to add extra suffix to url to open in browser (Fixes #4127) Summary of changes: .../src/main/java/org/nuiton/web/war/JettyLauncher.java | 13 +++++++++++-- nuiton-web/src/site/apt/Warlauncher.apt.vm | 8 +++++--- 2 files changed, 16 insertions(+), 5 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository nuiton-web. See https://gitlab.nuiton.org/nuiton/nuiton-web.git commit befcd0434efb258cf5280330fa17d769c2d64515 Author: Tony CHEMIT <dev@tchemit.fr> Date: Thu Jan 5 18:44:48 2017 +0100 Add an extra «--start» option in JettyRuner to add extra suffix to url to open in browser (Fixes #4127) --- .../src/main/java/org/nuiton/web/war/JettyLauncher.java | 13 +++++++++++-- nuiton-web/src/site/apt/Warlauncher.apt.vm | 8 +++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/nuiton-web/src/main/java/org/nuiton/web/war/JettyLauncher.java b/nuiton-web/src/main/java/org/nuiton/web/war/JettyLauncher.java index 5a9f0cd..e1c5b7e 100644 --- a/nuiton-web/src/main/java/org/nuiton/web/war/JettyLauncher.java +++ b/nuiton-web/src/main/java/org/nuiton/web/war/JettyLauncher.java @@ -79,6 +79,13 @@ public class JettyLauncher implements ActionListener, MouseListener { */ protected String contextPath = "/"; + /** + * Extrat suffix to add to the launch url (says http://localhost:{port}{contextPath}{startSuffixPath} + * + * @since 1.19 + */ + protected String startSuffixPath = ""; + /** Server name. */ protected String serverName; @@ -146,7 +153,7 @@ public class JettyLauncher implements ActionListener, MouseListener { return sw.toString(); } - protected void configure(String... args) throws Exception { + protected void configure(String... args) { for (int i = 0; i < args.length; i++) { if ("--port".equals(args[i])) @@ -156,6 +163,8 @@ public class JettyLauncher implements ActionListener, MouseListener { if (!contextPath.startsWith("/")) { contextPath = "/" + contextPath; } + }else if ("--start".equals(args[i])) { + startSuffixPath = args[++i]; } } } @@ -198,7 +207,7 @@ public class JettyLauncher implements ActionListener, MouseListener { // build server uri try { - serverUri = new URI("http://localhost:" + port + contextPath); + serverUri = new URI("http://localhost:" + port + contextPath + startSuffixPath); } catch (URISyntaxException e) { e.printStackTrace(); } diff --git a/nuiton-web/src/site/apt/Warlauncher.apt.vm b/nuiton-web/src/site/apt/Warlauncher.apt.vm index e0cf710..782b0ce 100644 --- a/nuiton-web/src/site/apt/Warlauncher.apt.vm +++ b/nuiton-web/src/site/apt/Warlauncher.apt.vm @@ -116,10 +116,12 @@ War launcher To change the port, use the <<--port>> option and to change the contextPath use the <<--path>> option. - In next example we change both: + Since version 1.19, you can add an extra option <<--start>> to specify the end of url of page to open in broswer. + + See the following example: -------------------------------------------------------------------- -java -jar mywar.war --port 8889 --path /home +java -jar mywar.war --port 8889 --path /context --start /index.html -------------------------------------------------------------------- - The browser will open on page http://localhost:8889/home \ No newline at end of file + The browser will open on page http://localhost:8889/context/index.html \ No newline at end of file -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm