WebSphere Application Server Network Deployment, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Preparing Application Clients run-time library component for Java Web Start

For a Thin Application client application to be launched using Java Web Start (JWS), you also need to create a Java Network Launching Protocol (JNLP) component to serve the Application Clients run-time library JAR files from the Application server. This JNLP component is referenced in the client application JNLP file with the <extension> tag. This article provides the steps to build the Application Clients run-time library component from an Application Clients installation. It is packaged as its own Web Archive Resource (WAR) file or to the same WAR file that contains the Application Clients run-time dependency component, and can be installed in an Application server.

Before you begin

Install the Application Client for WebSphere Application Server for the platform to which client applications deploy.

Steps for this task

  1. Install the Application Clients on the client application supported operating system. For example, install Application Clients in the C:\Program Files\IBM\WebSphere\AppClient directory.
  2. Change directory to the installation bin directory. See the following example for help:
    CD C:\Program files\IBM\WebSphere\AppClient\bin
  3. Run buildClientLibJars to copy the Application Clients run-time library JAR files from the Application Clients installation to a temporary directory. All the JAR files in the temporary directory are signed, as shown in the following example.
    buildClientLibJars C:\WebApp1\runtime\WebSphereJars 
                       myKeystore myPassword myKeyAliasName
    
    1. This step also requires you to create a keystore file, such as myKeystore.
    2. You must also create a self-signed certificate for the myKeystore file. For more information, see the topic, "Creating self-signed personal certificates."
  4. Create an Application Clients run-time installer JNLP descriptor file or a JavaServer Pages (JSP) file, if it is generated dynamically in the same temporary directory as previous step. See the sample JNLP file shown in the Example section of this topic.
  5. Package these JAR files and the Application Clients run-time library component JNLP descriptor file into a WAR file. You can also package both Application Clients run-time library component and Application Clients run-time dependency component in the same WAR file. This WAR file is packaged into an EAR file that can deployed to an Application server.

Example

<!--
  "This sample program is provided AS IS and may be used, executed, copied
and modified without royalty payment by customer (a) for its own instruction
and study, (b) in order to develop applications designed to run with an IBM
WebSphere product, either for customer's own internal use or for redistribution
by customer, as part of such an application, in customer's own products."
Product 5630-A36,  (C) COPYRIGHT International Business Machines Corp., 2004
All Rights Reserved * Licensed Materials - Property of IBM
-->
<%! private final String description="WebSphere Jars";  
%>
<%  // locally declared variable     

String	urlSt = request.getRequestURL().toString();     
String	jnlpCodeBase=urlSt.substring(0,urlSt.lastIndexOf('/'));     
String	jnlpRefURL=urlSt.substring(urlSt.lastIndexOf('/')+1,urlSt.length());     
// The client application descriptor noted a resource reference to be resolved at deploy time as following 
%> 
<%--     
	Need to set a JNLP mime type - if Web Start is installed on the client,     
	this header will induce the browser to drive the Web Start Client 

--%><% 
	response.setContentType("application/x-java-jnlp-file");   1 
	response.setHeader("Cache-Control", null); 
	response.setHeader("Set-Cookie", null); 
	response.setHeader("Vary", null); 
	response.setDateHeader("Last-Modified", lastModified);   2
%>
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for <%=description %> -->
<jnlp
  spec="1.0+"
	<%-- Automate the code base response
--%> codebase="<%=jnlpCodeBase%>"
href="<%=jnlpRefURL%>">
	<information>
		<title><%=description %></title>
		<description kind="short"><%=description %></description>
		<description kind="tooltip"><%=description %></description>
		<offline-allowed></offline-allowed>
	</information>
	<security>
	<all-permissions></all-permissions>
</security>
	<resources>
  	  <jar href="activation-impl.jar"/>			3
    <jar href="activity.jar"/>
    <jar href="activityImpl.jar"/>
    <jar href="activitySession.jar"/>
    <jar href="activitySessionPrivate.jar"/>
    <jar href="acwa.jar"/>
    <jar href="admin.jar"/>
    <jar href="annotations-core.jar"/>
    <jar href="appprofile-impl.jar"/>
    <jar href="appprofile.jar"/>
    <jar href="b2bjaxp.jar"/>

	  <!-- ========================================  -->
    <!--                                           -->
    <!-- specify all the signed jars created by    -->
    <!-- buildClientlibJars tool                   -->
    <!--                                           -->
    <!-- ========================================  -->

    <jar href="wsif-j2c.jar"/>
    <jar href="wsif.jar"/>
    <jar href="wssec.jar"/>
    <jar href="wtp-util.jar"/>
    <jar href="wtpemf.jar"/>
    <jar href="xsd.jar"/>
    <jar href="xsd.resources.jar"/>
    <jar href="xss4j-dsig.jar"/>
    <jar href="xss4j-enc.jar"/>
	</resources>
	<component-desc/>
</jnlp>



Sub-topics
buildClientLibJars tool

Related concepts
Web applications

Related tasks
Preparing the Application Client run-time dependency component for Java Web Start

Task topic    

Terms of Use | Feedback

Last updated: Mar 17, 2005 4:28:29 AM CST
http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/tcli_capps.html

© Copyright IBM Corporation 2002, 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)