Previous Next Contents Index


Using NAB 4.0 with Third-Party Tools

This appendix describes the interoperability considerations for using Netscape Application Builder 4.0 with third party tools.

The following topics are discussed in this appendix:


Using NAB 4.0 with Symantec Visual Café
You can use Symantec Visual Cafe to edit, compile, and debug your Java servlets. After you create a Netscape Application Builder project, you can perform the following steps to debug it with Visual Cafe:

  1. Create a Visual Cafe Project.
  2. Create a dummy class to invoke the Application Server Java engine.
  3. Set up the project configuration:
  4. Invoke NAS with your Visual Cafe project.
  5. Use Visual Cafe to debug your application.
The following sections describe these steps in more detail and show some common Visual Cafe Debugging Techniques.

Creating a Visual Cafe Project

  1. Open Visual Cafe.
  2. Choose the File - New Project... menu item.
  3. In the New Project dialog, select the "Empty Project" icon and press the OK button.
Creating a StartEngine Class

  1. Choose the Insert - Class... menu item.
  2. Specify the class name "StartEngine" in the name field and choose the Finish button.
  3. Open the StartEngine.java file and add the following method to the StartEngine class:
  4.     public static void main (String args[]) 
    
        {
    
          com.kivasoft.engine.Engine.main (args); 
    
        }
    
Configuring the Project

  1. Choose the Project - Options... menu item.
  2. Select the Project tab of the Options dialog box, and perform the following steps:
  3. Select the Directories tab of the Options dialog box, select "input class files" from the drop down list and add the following directories and jar files.
Note. Note that Visual Cafe provides a file browser so that you do not need to type in any file names directly.

  1. Select "Output files" from the drop-down list and set the "Output Directory" to
  2. Choose OK and then save your Visual Cafe project.
  3. Add the servlets and other Java classes located in your Netscape Application Builder Project directory to the Symantec project using the Insert - Files Into Project... menu item. (Be sure that these servlets have been registered by using the Build - Register - All Files menu item within Application Builder.)
Invoking NAS with a Visual Cafe Project

  1. Stop NAS if it is running.
  2. Restart NAS executive process manually by executing kxs from the command line in an MS-DOS window.
  3. Within Symantec, choose the Project - Run in Debugger menu item or press the F5 key to launch the Java engine.
  4. View the Messages window using the View - Messages menu item and look for a ready: <port number> message indicating that the server is ready to take requests.
  5. Set at least one breakpoint or specify other debug options within Visual Cafe.
  6. Open your browser to the index page of your application and exercise the servlets you want to debug.
Using Visual Cafe
You can use Visual Cafe with a wide range of debugging techniques. Several of the most common ways to use Visual Cafe are to

The following sections identify how to perform these operations using Visual Cafe. For complete information, see your Visual Cafe documentation.

Manipulating Breakpoints
You can set, view, disable, enable, and remove breakpoints. To set a breakpoint, open the source file the contains the line of code you want to break on and perform one of the following actions:

When a breakpoint is set, Visual Cafe displays a diamond to the left of the line.

To view your breakpoints, choose Breakpoints from the View menu. Visual Cafe displays the list of breakpoints currently set in the project. Enabled breakpoints are identified with a check mark to the left of the location. You can uncheck a breakpoint to disable it. You can also enable or disable breakpoints from the Breakpoints menu. You can remove a breakpoint by highlighting it in the Breakpoints window and pressing the delete key.

Stepping through Code
Step operations are controlled by the Debug menu. This menu also allows you to stop and restart your application or continue execution from where it was stopped.

Viewing Stack Information
You can use the Call Stack window to view stack information. Choose Call Stack from the View menu to open the window. When this window is active, Visual Cafe presents a Calls menu, from which you can examine methods and variables on the stack as well as passed parameter values and their types.

Examining Variables
You can use the Variables window to examine the values of variables. Choose Variables from the View menu to open the window and view all the variables that are currently in context. You can click on a plus sign next to a variable to expand it if necessary. You can modify the contents of a variable only if the application is paused in the debugger.


Using NAB 4.0 with Macromedia Dreamweaver
If you have Dreamweaver installed, you can use it with NAB, either as the default editor or as an editor that you specify when you open an HTML file.

To specify Dreamweaver as an HTML editor

  1. Choose Tools - Development Options...
  2. Select the HTML tab
  3. Specify the full path to Dreamweaver.exe as the External editor.
  4. Check the "Double-click invokes external editor" if you want Dreamweaver to be the default editor; do not check this box if you want to use both the NAB editor and Dreamweaver.
  5. Click OK to make the change.
If you selected the "Double-click invokes external editor" box in NAB, Dreamweaver will open an HTML file when you double-click on the file within NAB. If you did not select this option, you will see an Open in Dreamweaver menu item when you right-click the mouse on the file you want to open; selecting this item opens the file in Dreamweaver.

Because you typically use the NAB editor when you specify data-bound properties, such as GX tags, you most likely will not want to use Dreamweaver by default.

To ensure that Dreamweaver does not modify your HTML automatically:

  1. Open Dreamweaver.
  2. Select Preferences from the Edit menu.
  3. Select the HTML Rewriting category.
  4. Uncheck all items under Rewrite HTML.
Note. Although you can use Dreamweaver on files that contain GX tags, Dreamweaver does not recognize GX tags.


Using NAB 4.0 with the Visual Cafe Java Editor
If you have Visual Cafe installed, you can use it with NAB when you open a Java file.

To specify Visual Cafe as a Java editor

  1. Choose Tools - Development Options...
  2. Select the Java tab.
  3. Specify the full path to VCafe.EXE as the External editor.
  4. Check the "Double-click invokes external editor" if you want Visual Cafe to be the default editor; do not check this box if you want to use both the NAB editor and Visual Cafe.
  5. Click OK to make the change.
Note. If you cannot open the file using Visual Cafe, check that Visual Cafe's bin folder is at the start of your path.


Using NAB 4.0 with the Visual Cafe Java Compiler
If you have Visual Cafe installed, you can use it with NAB when you compile a Java file.

To specify Visual Cafe as your compiler

  1. Choose Tools - Development Options...
  2. Select the Java tab
  3. Specify the full path to sj.exe as the Compile command.
  4. Specify the compiler class path.
  5. Click OK to make the change.

 

© Copyright 1999 Netscape Communications Corp.