Configuring Reflection for the Web to Allow Client Access Using Java Web Start (JNLP)

  • 7022331
  • 06-Feb-2003
  • 25-Mar-2018

Environment

Reflection for the Web (All Editions) version 12.2
Reflection for the Web 2014 (All Editions)

Situation

This technical note describes how to configure Reflection for the Web to support Java Network Launch Protocol (JNLP), using Java Web Start. JNLP enables Java applications to run on client computers independently of web browsers. When used with Reflection for the Web, JNLP allows Reflection Java applets to start faster (because of applet and jar file caching). This functionality can be helpful for remote users accessing Reflection for the Web over a slow connection.

Note the following:

  • After the Reflection for the Web server is configured to use JNLP, you must first launch the Reflection Launcher applet through a web browser. (Subsequent connections do not require a browser.)
  • While using JNLP, Reflection still requires a connection to the web server during connection initialization.

Resolution

Required Components

This section lists and describes the components that are required for Reflection for the Web JNLP support.

  • Reflection for the Web: You must install Reflection for the Web. For information about obtaining Reflection for the Web, contact your local Sales office https://www.attachmate.com/company/contact/.
  • Java Web Start: The Oracle Java Web Start client must be downloaded and installed on each client computer. Java Web Start is included in the Java Runtime Environment (JRE).
  • Oracle Java Plug-in: While we recommend using the latest version of the JRE, use at least the minimum required for your version of Reflection for the Web.
    • For Reflection for the Web version 12.2: Java 1.7 or higher
    • For Reflection for the Web 2014 (version 12.0 or 12.1): Java 1.6 or higher
  • Launcher.jnlp File: Create a Launcher.jnlp file using the code provided in this technical note and then edit the code for your environment.

Configuring JNLP Support

To configure JNLP support in Reflection for the Web, you must create a .jnlp file. This section includes the sample code you can use to create the file, Launcher.jnlp, as well as the instructions for editing the code for your environment.

Launcher.jnlp Sample Code

<?xml version="1.0" encoding="UTF-8"?>
<jnlp
spec="1.0+"
<!-- The href and codebase attributes below must use an absolute URL to the web application. Edit your_server:port_number/application_context for your environment below.
-->
href="http://your_server:port_number/application_context/Launcher.jnlp" codebase="http://your_server:port_number/application_context/ex">
<information>
<title>Reflection for the Web Launcher</title>
<vendor>Attachmate, Inc.</vendor>
<homepage href="https://www.attachmate.com"/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.4+"/>
<jar href="Launcher.jar"/>
</resources>

<applet-desc name="Launcher" main-class="com.wrq.rweb.Launcher" documentbase="." width="600" height="400">
<param name="jsessionid" value="jnlp"/>

<!-- The servleturl value must be an absolute URL to the web application. Edit your server:port number/application context for your environment below.
-->

<param name="servleturl" value="http://your_server:port_number/application_context"/>
<param name="launcher.sessions" value="RMC"/>
<param name="launcher.keepalive" value="none"/>
<param name="RMC.prefsName" value="rmc_linkslist"/>
<param name="RMC.configuration" value="http://your_server:port_number/application_context/PassThru.do?rmc=true"/>

<!-- Uncomment the two lines below if you want to launch an embedded Reflection for the Web session using only one JNLP window. Also, enter the session name in the session_name placeholder below.
-->
<!--
<param name="jnlp.sessiontype" value="rweb"/>
<param name="jnlp.params" value="link=session_name&runinsameapp=true&portal=true"/>
-->
</applet-desc>

</jnlp>

Editing the Launcher.jnlp File

Follow the steps below to edit the sample Launcher.jnlp code for your environment.

  1. Copy the Launcher.jnlp code provided above to a web-addressable directory on your web server:
<Servlet Runner Home Directory>\webapps\rweb

The Windows default path depends on your product version:

    • Reflection for the Web version 12.2:
\Program Files\Micro Focus\MSS\apache-tomcat\webapps\rweb
    • Reflection for the Web 2014 (version 12.0 or 12.1):
\Program Files\Attachmate\ReflectionServer\apache-tomcat\webapps\rweb
  1. Open the Launcher.jnlp sample file using an ASCII text editor (such as Notepad, in Windows).
  2. Edit the three references in Launcher.jnlp to http://your_server:port_number/application_context to reflect your Reflection for the Web installation.
    • your_server: Specify the URL to your Reflection for the Web installation.
    • port_number: Specify the correct port number for your Reflection for the Web installation.
    • application_context: Specify the application context name for your Reflection for the Web Administrative Server (management server) installation. Note: "Management server" was renamed "Administrative Server" beginning in Reflection for the Web version 12.2.

For example, if you have Reflection for the Web Administrative (management) server installed on a server computer named myserver, and you accepted the defaults during installation for HTTP port (80) and application context name (rweb), then the three URLs should begin as follows:

http://myserver/rweb/

If you have Reflection for the Web Administrative (management) server installed on a server computer named myserver, using port 8080 for http and using an application context name of ATMrw, then the three URLs should begin as follows:

http://myserver:8080/ATMrw/ or http://localhost:8080/ATMrw/
  1. Make any configuration modifications required.

Note the following:

    • For jar file caching and to allow users to start Reflection for the Web from a shortcut without using a browser, retain the <offline-allowed/> parameter.
    • You must retain the following parameters in the Launcher.jnlp file:
<param name="jsessionid" value="jnlp"/>
<param name="launcher.keepalive" value="none"/>
<param name="launcher.sessions" value="RMC"/>
<param name="RMC.prefsName" value="rmc_linkslist"/>
<param name="RMC.configuration" value="http://your server:port number/application context/PassThru.do?rmc=true"/>
    • For Reflection for the Web 2014, the RMC.activationfiles applet must be added to the Launcher.jnlp file with the correct values for your install. Determine the value as follows:
a. Browse to the Reflection for the Web Links List (http://your server:port/rweb).
b. In the browser, click View source.
c. In the HTML source, find the RMC.activationfiles parameter and copy it. For example:
<param name="RMC.activationfiles" value="activation.reflection_security_gateway;activation.rweb_enterprise_edition">
    • For HTTPS connections, the Reflection for the Web server host name in the Launcher.jnlp file must match the host name "Common Name" (CN) in the Reflection for the Web (tomcat) server certificate.
    • JNLP sessions cannot be redirected from HTTP to HTTPS connections. This means that if you specify HTTP in URLs in the Launcher.html file, verify that you have "HTTP (clear text – not secure)" selected on the Security tab in the Settings tool in the Administrative WebStation.
  1. Save and close the file.

Launching a JNLP Session

Once you configure the Launcher.jnlp file, following the instructions above, end users who have the Java Web Start client installed can access Reflection for the Web sessions using JNLP. A web browser is required for each user only during the initial download of Reflection; after that, no web browser is needed.

The First Launch

From the client workstation, follow the steps below to launch Reflection for the Web for the first time using JNLP.

  1. In a web browser, launch a URL that points to the Launcher.jnlp file. For example:
http://myserver/rweb/Launcher.jnlp

Note the following:

    • This URL is case sensitive.
    • You may need to modify this URL in the Launcher.jnlp file; review the suggestions in step 3 in the previous section, Configuring JNLP Support.
  1. A security warning displays, asking if you want to run Reflection for the Web. Click Run.
  2. A prompt may appear asking if you want to create a desktop shortcut. Selecting Yes creates a desktop and Start Menu shortcut for subsequent launches of the applet.

Note: If the shortcut prompt doesn’t appear, you can still create a shortcut by following the steps under “Using Shortcuts†in the Subsequent Launches section.

  1. If the Launcher dialog box appears, then continue with step 5.

If instead you see a File Download dialog, you may need to change the Windows file extension association for JNLP by opening My Documents > Tools > Folder Options > File types. Select JNLP, click Change, select javaws, and then click OK. Then repeat steps 1 and 2 above.

  1. In the Launcher dialog box, click the Reflection for the Web session you want to run.
  2. Run the Reflection for the Web session and close it when finished.

Subsequent Launches

After you launch the Reflection for the Web Launcher once through your browser, you can subsequently start the Reflection for the Web Launcher from a shortcut on the desktop or Start menu, or from the Java Web Start window.

Note the following:

  • When you launch Reflection, two windows open—a Launcher applet window and a Reflection session window—regardless of the startup method you select. The Launcher applet window can be minimized, but it must remain open while Reflection out-of-browser terminal emulation sessions are in use. Closing the Launcher applet will shut down out-of-browser Reflection terminal emulation sessions. However, Reflection embedded sessions can run independently of the Launcher applet after the Launcher applet launches the embedded session since embedded Reflection sessions run within a browser window. If you want only one JNLP window to display, see the Launching a Reflection for the Web Session without Additional Windows section below.
  • Users can run multiple concurrent Reflection sessions.

Using Shortcuts

If you retained the <offline-allowed/> parameter in the Launcher.jnlp file, then users can follow the steps below to create and use a shortcut to start the Reflection for the Web Launcher applet without using the Java Web Start Application Manager.

  1. Open the Java Web Start Application Manager by clicking Start > Programs > Java Web Start and selecting Reflection for the Web Launcher.

Note the following:

    • If Java Web Start is not available on the Programs menu, open the Java Control Panel applet. On the General tab, click the Settings button under Temporary Internet Files; then click the View Applications button.
    • If Reflection for the Web Launcher does not appear in the Applications window, click View > Downloaded Applications.
  1. Click Application > Create Shortcuts, select the shortcut location you prefer, and then click Yes.

You can now launch Reflection for the Web Launcher by clicking (or double-clicking) the shortcut. This shortcut can be located on the local PC, on a web page, in an email message, or other locations.

Using the Java Web Start Application Manager

To start Reflection from the Java Web Start Application Manager:

  1. In Windows, click Start > Programs > Java Web Start.

Note the following:

    • If Java Web Start is not available on the Programs menu, open the Java Control Panel applet. On the General tab, click the Settings button under Temporary Internet Files; then click the View Applications button.
If the Reflection for the Web Launcher does not appear in the Applications window, click View > Downloaded Applications.
    • If you created a shortcut, it will display on the Programs menu as “Reflection for the Web Launcher.â€
  1. Select the Reflection for the Web Launcher application and click Start.

Closing the Session

To close the Reflection session, exit your host application and host connection as usual. Then close the Reflection for the Web window, the Launcher window, and the Java Web Start Application Manager.

Launching a Reflection for the Web Session without Additional Windows

If you would like to launch an embedded Reflection session within a JNLP window without any additional Java Web Start windows, uncomment the two lines below at the bottom of the Launcher.jnlp file and define an embedded session name.

<param name="jnlp.sessiontype" value="rweb"/>
<param name="jnlp.params" value="link=session_name&runinsameapp=true&portal=true"/>

Note: If the name of the terminal session ("session_name" above) contains any spaces or special characters, right-click the session's link in the Links List and select "Copy URL to clipboard" to determine the correct link name. The link name is embedded in the URL listed in the Address field. It contains the HTML indicators that denote spaces or special characters. Paste the URL into a text editor and make a note of the link name, including the special characters.

For example, a link titled "Sales Data" is represented by red text in the following URL:

https://www.mycompany.com:843/rweb/rweb?link=
Sales*u0020Data&rwebgroup=admin

The parameters for this link in the JNLP window become

<param name="jnlp.sessiontype" value="rweb"/>
<param name="jnlp.params" value="link=
Sales*u0020Data&runinsameapp=true&portal=true"/>

Additional Information

Legacy KB ID

This article was originally published as Attachmate Technical Note 1729.