Name Last modified Size
Parent Directory 21-Feb-2018 20:17 - CHANGELOG.txt 07-Oct-2018 15:12 11k COPYING 16-Aug-2018 13:03 1k Makefile 11-Jan-2018 10:20 2k README.txt 11-Jan-2018 10:20 7k cgi.h 15-Mar-2016 09:36 4k jnlp-server.c 11-Jan-2018 10:20 8k
The Java programming language and execution environment provide an excellent and portable way to implement a GUI (Graphical User Interface) client program for a networked embedded device. If the embedded network device includes a web server, the user interface client programs can be stored on the device and downloaded as necessary by the user client web browser.
The Java language originally included the Applet class specifically for the implementation of Java programs to be executed in a protected web browser environment or sandbox. However, the difficulty in supporting applets in a portable way led to the design of the Java Web Start environment that allows execution of Java applications (not just applets) by a client web browser.
The Java Web Start client (built into the browser and/or Java extension) relies on a JNLP (Java Network Launching Protocol) metadata file that describes the Java application, where to retrieve it, and how to execute it. In large scale installations, the JNLP metadata file is typically generated on the fly by a Python or Perl script or some similar method. However, very small embedded network devices may not have resources to run a Python or Perl interpreter.This JNLP server is a CGI program that can be run from an embedded system web server such as that included in the BusyBox suite. It will generate a JNLP file on the fly, based on both compile time constants and query parameters.
Download and unpack the source tarball. Switch to the source directory and run make.
Some make macros can change the behavior of jnlp-server:
Example make invocation (note the double quoting):
make VENDOR='"Munts Technologies"' JAR_REPOSITORY='"/www/java"'
The jnlp-server CGI program is largely controlled by appending query parameters to the URL. The following query parameters are recognized:
Here is an example URL reference, suitable for embedding in an HTML file, for a Java application program that connects to a TCP/IP server process on the server it came from:
<a href="/cgi-bin/jnlp-server?APPLICATION=example_client&ARG1=%40%40HOSTNAME%40%40">HTTP GET Java Client</a>
When the user clicks on this URL from his web browser, a query will be sent to the web server. The web server will run jnlp-server which will generate a JNLP file on the fly and return it to the user's web browser. The Java Web Start code within the browser will recognize the JNLP file and dispatch it to the Java Web Start client module. The Java Web Start client module will download example_client.jar from the web server and then execute it with the java interpreter, passing the name of the web server as the first command line argument to the Java main() method.
Copyright (C)2013-2018, Philip Munts, President, Munts AM Corp. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.