NCSA: National Center for Supercomputing Applications
AllianceNCSAUser_InfoAccess
University of Illinois at Urbana-Champaign
Leading Edge Site

NCSA Habanero®
The -web Switch


The -web switch alows you to use Habanero as a helper application for your favorite web browser. This will allow you to join a session or replay recorded data from a web page. Using -web in the client's script configures Habanero to invoke the client based on the data received from a browser. When the browser is configired properly, it downloads the file, invokes Habanero and passes the data to Habanero. At this point Habanero trys to either join the defined session or it connects to a web site to download replay data. Setting up your system involves:

  1. Copy and Edit the Habanero client script
  2. Configure your web browser
  3. Put the Session Definition or Replay Data on a Web Site
  4. Add a MIME type the Web Server's Config File

1.     Copy and Edit the Habanero client script

  1. Make a copy of your current client script(UNIX), batch file(Windows) or icon(Mac).
  2. Give this new file a unique name. For example:   HabaneroWeb or HabaneroWeb.bat
  3. Edit the file and add the -web switch to the end of the command line. For example:

          java Habanero -web %1

    Note:%1, $1 are place holders for a parameter. Windows uses %1 and UNIX and Mac use $1.

 

A Sample Windows Batch File
@ECHO OFF
SET PATH=C:\jdk1.1.7;C:\jdk1.1.7\bin;C:\Program Files\NCSA\Habanero2.0\rsc\lib\w95;
SET LD_LIBRARY_PATH=C:\jdk1.1.7\lib
SET HOME=C:\Program Files\NCSA\Habanero2.0
SET CLASSPATH=.;C:\jdk1.1.7\lib\classes.zip
SET CLASSPATH=%CLASSPATH%;C:\Program Files\NCSA\Habanero2.0
SET CLASSPATH=%CLASSPATH%;C:\Program Files\NCSA\Habanero2.0\apps
SET CLASSPATH=%CLASSPATH%;C:\Program Files\NCSA\Habanero2.0\apps\savina
SET CLASSPATH=%CLASSPATH%;C:\Program Files\NCSA\Habanero2.0\rsc\ObjectSpace\voyager.jar
SET CLASSPATH=%CLASSPATH%;C:\Program Files\NCSA\Habanero2.0\rsc\ObjectSpace\jgl3.1.0.jar
SET CLASSPATH=%CLASSPATH%;C:\Program Files\NCSA\Habanero2.0\rsc\ObjectSpace\swingall.jar
SET CLASSPATH=%CLASSPATH%;C:\Program Files\NCSA\Habanero2.0\rsc\ObjectSpace\x509v1.jar
ECHO Starting the Habanero Client from a Web page.
ECHO Press Ctrl-C in this window to terminate the Client.
java Habanero -web %1

A Sample UNIX Script
#!/bin/ksh
PATH=$PATH:/java/sun/jdk1.1.7/bin
CLASSPATH=.:/java/sun/jdk1.1.7/lib/classes.zip:/usr/local/bin/habanero:/usr/local/bin/habanero/apps: /usr/local/bin/habanero/apps/Savina:/usr/local/bin/habanero/rsc/jars/jgl3.1.0.jar: /usr/local/bin/habanero/rsc/jars/voyager.jar:/usr/local/bin/habanero/rsc/jars/swingall.jar: /usr/local/bin/habanero/rsc/jars/x509v1.jar:
LD_LIBRARY_PATH=/usr/local/bin/habanero/rsc/lib/Solaris:$LD_LIBRARY_PATH
java Habanero -web $1

 

2.     Configure your web browser

The installation program for Windows configures the system to recognize session definitions (.def) and replay data(.hab) as Habanero specific extensions. Windows IE & Netscape users are set and should not have to define Habanero as a helper application. If you are not familiar with this process, refer to your browser's help file for details about adding helper applications. Configure your web browser to use Habanero as a helper application using the following information:

Description of type:Habanero Session Defintion
File Extension: def
MIME Type: application/x-habaneroSession
Application to use: Use the Browse button and find the HabaneroWeb script, batch file or icon.

 

3.     Put the Session Definition or Replay Data on a Web Site

The session definitions you create are single files located in the habanero.rsc/templates directory. Simply put a copy of the file on the web site and link it to a page. The session definition file must have the .def file extension. For example:
	< A HREF="NCSASession.def">NCSA Session</A>

The replay data is a set of files located in the /capture/<Session Name> directory. The entire directory needs to be coppied to a web site. In addition, a file needs to be created that contains the URL pointing to the data set and it must have a .hab extension.

For example, if I recorded data from the NCSA Session, I would copy the /captured/NCSASession directory to my web site and create a file containing the URL to the data set. I'll call this file NCSASessionRecordedData.hab and it will contain the following URL:


	http://havefun.ncsa.uiuc.edu/someDirectory/NCSASession/

Next, I'd link NCSASessionRecordedData.hab to a web page.
	
	< A HREF="NCSASessionRecordedData.hab">Recorded Data from NCSA Session - 4/12/99</A>

 

4.     Add a MIME type the Web Server's Config File

Make sure the web server recognizes the .hab and .def file extensions. Otherwise, the server will use its default file type and could deliver the .hab and .def files to the browser as ASCII. Either add or ask your web server administrator to add the following MIME type to the web server's mime.types file.
	application/x-habanero          hab def

 


A Navigation Image Map. Use the links below.
[ Download ] [ User Docs ] [ FAQs ] [ Home ] [ Dev API ] [ Tools ] [ License ]

Habanero® is a registered trademark owned by The Board of Trustees of the University of Illinois. Copyright 1996-1998. All rights reserved.   Java(TM) is a proprietary trademark owned by Sun Microsystems, Inc.

 
[Alliance] Alliance NCSA UIUC [NCSA]