Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Dynamic JNLP

Claude Lacombe has been programming since 1977. He has developed applications for various engineering fields including civil, mechanical, and aerospace engineering. In 1996, Claude got his first taste of Java and has never turned back.

Summary:  This tutorial examines a custom, dynamic implementation of Java Network Launch Protocol (JNLP) to shift some of the server's processing load to the client. Veteran developer Claude Lacombe draws on his experience developing an industrial-sized application that required some modifications to JNLP and presents the fruits of his labor. A fully-functioning application is provided for guidance.

Date:  20 Aug 2003
Level:  Introductory PDF:  A4 and Letter (346 KB | 23 pages)Get Adobe® Reader®

Activity:  5740 views
Comments:  

Getting started

What is this tutorial about?

Surfing the Internet is now an experience that is second nature to most people who have access to a computer. However, the ease with which information can be accessed hides the basic client-server architecture of the Web -- an architecture in which servers are busy processing information and clients remain more or less idle. Often situations occur in which it would be much more convenient to free the server of a portion of its load by having the client participate in the execution of a fraction of the work.

This tutorial will examine this type of situation, detailing the use of the Java Network Launch Protocol (JNLP) API to shift some of the load to the client. JNLP is usually defined as a mechanism for transferring a server-resident application over a network and across firewalls, and launching it on a client. JNLP is a component protocol of Java Web Start -- a technology for simplifying deployment of Java applications by allowing users to launch full-featured applications with a single click from a Web browser without going through complicated installation procedures. Java Web Start is bundled with J2SE.

You should take this tutorial if you want to develop a Java application, package it and make it secure, transfer it from server to client side, then enable it to launch easily and quickly on the client side without a messy installation process. You'll learn how to use the Java Web Start technology, focusing on the JNLP API.


The Fruit Salad Elementary School case study

This tutorial introduces the Fruit Salad Elementary School Web site. The Web site provides a single Web page where the pupils can practice their addition tables. The pupils learn an addition rule by selecting a pair of fruits of different kinds (an apple and an orange, two oranges and a banana, and so). By clicking on a pair of fruits, JNLP is invoked dynamically and transfers data along with an application to the pupil's workstation. At the end of the exercise, the result of the addition is sent back to the server so Mrs. Fruit Jam, the Math teacher, can monitor the children's individual performances and usage.

While this case study is fairly simplistic, it mimics the more complex problem encountered in the engineering project described in A real-world example.


Prerequisites

To run the application demonstrated in this tutorial, you need a servlet container installed. If you don't have access to a rugged enterprise-strength container such as WebSphere Application Server, then the open source Tomcat server from the Apache Group is a good choice.

On the client, you need a JNLP-compliant activator installed. If you are not experienced in this area, I suggest using Java Web Start, which comes bundled with the J2SE platform, version 1.4.x. Alternatives to Java Web Start are OpenJNLP or Netx, two open source implementations of JNLP. In this tutorial, I've used Java Web Start as the JNLP activator.

You should have at least a basic understanding of Ant, the ubiquitous build tool from the Apache Software Foundation, along with a working knowledge of Java servlets, JSP technology, and general Java programming.

For links to all the items discussed above, including the source code for the FruitProcessor application, see Resources.

1 of 9 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Java technology
ArticleID=131555
TutorialTitle=Dynamic JNLP
publish-date=08202003
author1-email=claude.lacombe@videotron.ca
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).