This appendix describes the interoperability considerations for using Netscape Application Builder 4.0 with third party tools.
Using NAB 4.0 with Symantec Visual Café
Using NAB 4.0 with Macromedia Dreamweaver
Using NAB 4.0 with the Visual Cafe Java Editor
Create a Visual Cafe Project.
Create a dummy class to invoke the Application Server Java engine.
Set up the project configuration:
Invoke NAS with your Visual Cafe project.
Use Visual Cafe to debug your application.
Open Visual Cafe.
Choose the File - New Project... menu item.
In the New Project dialog, select the "Empty Project" icon and press the OK button.
Choose the Insert - Class... menu item.
Specify the class name "StartEngine" in the name field and choose the Finish button.
Open the StartEngine.java file and add the following method to the StartEngine class:
public static void main (String args[])
{
com.kivasoft.engine.Engine.main (args);
}
Choose the Project - Options... menu item.
Select the Project tab of the Options dialog box, and perform the following steps:
Select "Application - A program that requires java.exe to run" as your Project Type.
Specify "StartEngine" as your Main Class.
Specify "-d" for Program arguments.
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.
The following lines assume you have installed NAS in the c:\Netscape\Server4 directory:
c:\Netscape\Server4\nas\APPS
c:\Netscape\Server4\nas\lib\java\kfcjdk11.jar
c:\Netscape\Server4\nas\lib\java\jdbc20.jar
c:\Netscape\Server4\nas\lib\java\javax.jar
Select "Output files" from the drop-down list and set the "Output Directory" to
Choose OK and then save your Visual Cafe project.
You may wish to save the "generic" project you have created. To customize it to debug a particular Netscape Application Builder project, open the project in Visual Cafe and use the "File - Save As" command to save it under a different name.
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.)
The first time you add a Servlet java file to your Visual Cafe project, make sure Visual Cafe has not changed your project type to "Servlet". Check the project options (Project - Options... menu item.) make sure the project type is still set to "Application - A program that requires java.exe to run.
Stop NAS if it is running.
If NAS is running as a Windows system service, stop the service from the Windows Control panel.
If NAS was started using Netscape Application Builder, use the Stop Server menu item in NAB's Test menu to stop the service.
Restart NAS executive process manually by executing kxs from the command line in an MS-DOS window.
Within Symantec, choose the Project - Run in Debugger menu item or press the F5 key to launch the Java engine.
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.
Set at least one breakpoint or specify other debug options within Visual Cafe.
Open your browser to the index page of your application and exercise the servlets you want to debug.
set, view, disable, enable, and remove breakpoints
step into, out of, or over code
view stack information
examine variables
Click the line on which you want to break and from the Source menu choose Set Breakpoint
Right-click the line on which you want to break and select Set Breakpoint
Press F9 from the current line to set a breakpoint for the line (F9 toggles the breakpoint, removing it if already set)
Choose Tools - Development Options...
Select the HTML tab
Specify the full path to Dreamweaver.exe as the External editor.
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.
Click OK to make the change.
Open Dreamweaver.
Select Preferences from the Edit menu.
Select the HTML Rewriting category.
Uncheck all items under Rewrite HTML.
Deselect "Fix Iinvalidly Nested and Unclosed Tags" and "Remove Extra Closing Tags."
Select the Java tab.
Specify the full path to VCafe.EXE as the External editor.
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.
Select the Java tab
Specify the full path to sj.exe as the Compile command.
Specify the compiler class path.