Java Directory Tree Walker Sample
(with NSAPI on Netscape Enterprise Server)
This sample, given a directory, will print out a list of the files with their attributes. It will also do the same for
the subdirectories.
This file contains instructions for running this sample with the Netscape Enterprise Server. For instructions on
running the sample with either the Microsoft Internet Information Server or the Microsoft Personal Web
Server, please refer to the file IDir_Walker.html. This file will only provide the instructions to run this
sample. For a more detailed explanation of the components, please refer to the file NetscapeInstall.html.
Click here for installation instructions.
To run this sample on your machine, you will need to install the following components:
- Netscape Enterprise Server
- Microsoft Java VM
Server Side Instructions
To configure the Netscape Enterprise Server
- Go to your \Netscape\Server\docs directory
- Create a file named service.wjava and add these statements to it:
<HTML>
<HEAD>
<TITLE>Optima++ Java Netscape Service Placeholder</TITLE>
</HEAD>
<BODY>
<BLOCKQUOTE>
<FONT SIZE=+3>P</FONT><FONT SIZE=+1>laceholder for Optima++ Java
support. If you see this file on your browser, you have not installed
or setup the JAVANSAPI.DLL properly.
</BODY>
</HTML>
- Save service.wjava and close the file
- Go to your \Netscape\Server\https-serverName\config directory, where serverName is the
name of your Netscape Enterprise Server.
For example: d:\Netscape\Server\https-mnguyen\config
- Open the file obj.conf.
- Add this line after the last Init fn= statement (all on 1 line, without newlines):
Init fn="load-modules" shlib="%Starbuck%/system/javansapi.dll"
funcs="wjava-fn,wjava-ntrans"
where %Starbuck% is the directory where Starbuck is installed
For example:
Init fn="load-modules" shlib="d:/starbuck20/system/javansapi.dll"
funcs="wjava-fn,wjava-ntrans"
- Add this line after the <Object name="default"> statement:
NameTrans fn=wjava-ntrans
- Add these lines after </Object> statement that closes the <Object name="default">
section: <Object name=wjava>
Service fn=wjava-fn
</Object>
- Save obj.conf and restart your Netscape Enterprise Server
The classpath field is the path to the Java class files for this sample. If you run this sample from Starbuck,
Starbuck will copy the class files and this html file to your \Netscape\Server\docs\NDir_Walker
directory. From your HTML editor, modify the classpath field to point to your
\Netscape\Server\docs\NDir_Walker directory
Client Side Instructions
To run this sample from Starbuck
- Start the Netscape Enterprise Server
- Start Starbuck
- Open this sample project: IDir_Walker.wxp
- From the View menu of the main Starbuck menu bar, click Targets
- In the Targets window, use the right button to click on NDir_WalkerWebApp. Then choose Run
Options
- On the General page, click Publish, then run a web browser
- Click Configure and choose your Web browser
- Click on the Initial URL for the browser box and type the following URL:
http://localhost/NDir_Walker/NDir_Walker.html
- Click OK
- Click the Publish tab. On the Publish page, click Copy the files to a folder
- Click in the Folder box and type the path to your \Netscape\Server\docs\NDir_Walker directory
For example: D:\Netscape\Server\docs\NDir_Walker\
- Click OK to finish
- To run this sample, from the Run menu of the main Starbuck menu bar, click Run
- In the Default Program window, click on NDir_WalkerWebApp and click OK
- Wait for your Web browser to load this file
- In the Directory Submission Form, click on the Directory box and then type the directory name
whose files you want to view
- Click on View Files to view the file attribute listing for this directory.
To run this sample from outside Starbuck
- Make sure that this html file and the class files for this project are copied to your
\Netscape\Server\docs\NDir_Walker directory. The class files for this project are located in
\%Starbuck%\samples\IDir_Walker\Debug directory, where %Starbuck% is the directory where
you installed Starbuck
- Start the Netscape Enterprise Server
- Start your Web browser and type in the following URL:
http://localhost/NDir_Walker/NDir_Walker.html
- In the Directory Submission Form, click on the Directory box and then type the directory name
whose files you want to view
- Click on View Files.