Configuring Reflection for the Web to Allow Client Access Using Java Web Start (JNLP)
Technical Note 1729
Last Reviewed 05-Dec-2008
Applies To
Reflection for the Web 2011 (All Editions)
Reflection for the Web 2008 (All Editions)
Summary

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 (due to 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.

This technical note is organized into the following sections:

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 Sales at SalesRecept@attachmate.com.
  • Java Web Start: Download and install Java Web Start (JWS) on each client computer. Client computers must have the Oracle Java Web Start client installed. Java Web Start is available in most Java Runtime Environments, or you can obtain it from Oracle's web page at http://www.oracle.com/technetwork/java/javase/javawebstart/index.html. Detailed information about Java Web Start and JNLP can also be found at that location.
  • 1.4.2_06 Oracle Java Plug-in or higher: See http://www.oracle.com/technetwork/java/javase/overview/index.html for more information.
  • 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 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="http://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"/>

<!-- 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 2011:

\Program Files\Attachmate\ReflectionServer\apache-tomcat\webapps\rweb

Reflection for the Web 2008:

\Program Files\ReflectionServer\Jakarta-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 management server installation.

For example, if you have Reflection for the Web 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 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"/>
    • 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 should display, 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.
  3. 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 have launched 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 e-mail message, or other locations.

Using the Java Web Start Application Manager

To start Reflection from the Java Web Start Application Manager, follow these steps:

  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 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.

Note: If the Reflection for the Web Launcher does not appear in the Applications window, click View > Downloaded Applications.

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"/>
Related Technical Notes
9988 Reflection for the Web Technical Notes

Did this technical note answer your question?

           



Need further help? For technical support, please contact Support.