Re: RFR: 8277459: Add jwebserver tool [v3]
> This change introduces jwebserver, a dedicated JDK tool for the Simple Web > Server. > > A description is provided in a follow-up comment. Julia Boes has updated the pull request incrementally with one additional commit since the last revision: fix whitespace error, add missing code tag - Changes: - all: https://git.openjdk.java.net/jdk/pull/6497/files - new: https://git.openjdk.java.net/jdk/pull/6497/files/513c5a1a..60acea9d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=6497=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk=6497=01-02 Stats: 2 lines in 2 files changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/6497.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6497/head:pull/6497 PR: https://git.openjdk.java.net/jdk/pull/6497
Re: RFR: 8277459: Add jwebserver tool [v2]
On Wed, 24 Nov 2021 17:15:35 GMT, Julia Boes wrote: >> This change introduces jwebserver, a dedicated JDK tool for the Simple Web >> Server. >> >> A description is provided in a follow-up comment. > > Julia Boes has updated the pull request incrementally with one additional > commit since the last revision: > > address PR comments: > * update module and package summary > * add -version / --version option to usage > * fix markdown formatting src/jdk.httpserver/share/classes/module-info.java line 39: > 37: * The {@link com.sun.net.httpserver.spi} package specifies a Service > Provider > 38: * Interface (SPI) for locating HTTP server implementations based on the > 39: * com.sun.net.httpserver API. Nit: maybe this should be ` * {@code com.sun.net.httpserver} API.` - PR: https://git.openjdk.java.net/jdk/pull/6497
Re: RFR: 8277459: Add jwebserver tool [v2]
> This change introduces jwebserver, a dedicated JDK tool for the Simple Web > Server. > > A description is provided in a follow-up comment. Julia Boes has updated the pull request incrementally with one additional commit since the last revision: address PR comments: * update module and package summary * add -version / --version option to usage * fix markdown formatting - Changes: - all: https://git.openjdk.java.net/jdk/pull/6497/files - new: https://git.openjdk.java.net/jdk/pull/6497/files/80b55848..513c5a1a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=6497=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk=6497=00-01 Stats: 164 lines in 11 files changed: 5 ins; 94 del; 65 mod Patch: https://git.openjdk.java.net/jdk/pull/6497.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6497/head:pull/6497 PR: https://git.openjdk.java.net/jdk/pull/6497
Re: RFR: 8277459: Add jwebserver tool
On Wed, 24 Nov 2021 11:57:16 GMT, Daniel Fuchs wrote: >> This change introduces jwebserver, a dedicated JDK tool for the Simple Web >> Server. >> >> A description is provided in a follow-up comment. > > src/jdk.httpserver/share/classes/com/sun/net/httpserver/SimpleFileServer.java > line 110: > >> 108: * >> 109: * A simple HTTP file server implementation is provided via the >> 110: * {@code jwebserver} tool. > > Maybe an `@toolGuide jwebserver` javadoc tag could also be added here too, at > line 111? The tag can currently only be added to module and package summaries, if I read the code correctly, see `open/make/jdk/src/classes/build/tools/taglet/ToolGuide.java`. I can check if we can add class-level support at a later point. - PR: https://git.openjdk.java.net/jdk/pull/6497
Re: RFR: 8277459: Add jwebserver tool
On Mon, 22 Nov 2021 09:43:19 GMT, Julia Boes wrote: > This change introduces jwebserver, a dedicated JDK tool for the Simple Web > Server. > > A description is provided in a follow-up comment. Build changes look good. src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/JWebServer.java line 60: > 58: public static void main(String... args) { > 59: int ec = SimpleFileServerImpl.start(new PrintWriter(System.out, > true, UTF_8), "jwebserver", args); > 60: if (ec != 0) Personally I strongly dislike multiline if-statements without braces. They are an invitation to mistakes. Please reconsider putting this on one line, or adding braces. - PR: https://git.openjdk.java.net/jdk/pull/6497
Re: RFR: 8277459: Add jwebserver tool
On Mon, 22 Nov 2021 09:43:19 GMT, Julia Boes wrote: > This change introduces jwebserver, a dedicated JDK tool for the Simple Web > Server. > > A description is provided in a follow-up comment. src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/resources/simpleserver.properties line 45: > 43: -p, --port- Port to listen on. Default: 8000.\n\ > 44: -h, -?, --help- Print this help message.\n\ > 45: -version, --version - Print version information.\n\ Should this be " - Print version information and exit." - PR: https://git.openjdk.java.net/jdk/pull/6497
Re: RFR: 8277459: Add jwebserver tool
On Mon, 22 Nov 2021 09:43:19 GMT, Julia Boes wrote: > This change introduces jwebserver, a dedicated JDK tool for the Simple Web > Server. > > A description is provided in a follow-up comment. src/jdk.httpserver/share/classes/com/sun/net/httpserver/SimpleFileServer.java line 110: > 108: * > 109: * A simple HTTP file server implementation is provided via the > 110: * {@code jwebserver} tool. Maybe an `@toolGuide jwebserver` javadoc tag could also be added here too, at line 111? src/jdk.httpserver/share/classes/module-info.java line 30: > 28: * for running a minimal HTTP server. > 29: * > 30: * The com.sun.net.httpserver package defines a high-level API for > building Maybe that should be " The {@link com.sun.net.httpserver} package defines ..." src/jdk.httpserver/share/classes/module-info.java line 34: > 32: * simple HTTP-only file server intended for testing, development and > debugging > 33: * purposes. A default implementation is provided via the {@code > jwebserver} tool > 34: * and the main entry point of the module, which can be invoked with should we say "which can also be invoked ..." ? src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/SimpleFileServerImpl.java line 74: > 72: * @param writer the writer to which output should be written > 73: * @param args the command line options > 74: * @param launcher the launcher the server is started from should this be aligned like the other `@param` tags? src/jdk.httpserver/share/classes/sun/net/httpserver/simpleserver/resources/simpleserver.properties line 30: > 28: \ [-o none|info|verbose] [-h to show options] > 29: > 30: usage.jwebserver=\ should usage also show `-version, --version` in both usage strings, and in the usage summary of the man page below as well? - PR: https://git.openjdk.java.net/jdk/pull/6497
Re: RFR: 8277459: Add jwebserver tool
On Mon, 22 Nov 2021 09:43:19 GMT, Julia Boes wrote: > This change introduces jwebserver, a dedicated JDK tool for the Simple Web > Server. > > A description is provided in a follow-up comment. This change adds a dedicated command-line tool for the Simple Web Server, to improve convenience and approachability. The new tool `jwebserver` calls the main entry point of the jdk.httpserver module, thus hiding this implementation detail which is not hidden with `java -m jdk.httpserver`. The command-line options are identical, the only addition is support for `-version` / `--version`. A man page for `jwebserver` is added and the module and package level documentation is updated to reflect the new tool. A new internal class JWebServer is added to be able to distinguish whether the server was launched via `jwebserver` or `java -m jdk.httpserver`. The new tests are copies of the existing command-line tests. CSR: https://bugs.openjdk.java.net/browse/JDK-8277460 - PR: https://git.openjdk.java.net/jdk/pull/6497
RFR: 8277460: Add jwebserver tool
This change introduces jwebserver, a dedicated JDK tool for the Simple Web Server. A description is provided in a follow-up comment. - Commit messages: - update module summary - Merge branch 'master' into jwebserver - add version option, consolidate tests, update module and package level doc - drop "tool" in man page - Merge branch 'master' into jwebserver - update markdown - update troffl file - merge origin/jwebserver into jwebserver - initial commit - initial commit Changes: https://git.openjdk.java.net/jdk/pull/6497/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=6497=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8277460 Stats: 683 lines in 17 files changed: 603 ins; 22 del; 58 mod Patch: https://git.openjdk.java.net/jdk/pull/6497.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6497/head:pull/6497 PR: https://git.openjdk.java.net/jdk/pull/6497