Previous     Contents     Index     DocHome     Next     
Application Builder 6.0 iPlanet Application Builder User's Guide



Appendix B   Using the Application Builder with Third-Party Tools


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

The following topics are discussed in this appendix:



Using iAB with Symantec Visual Café

You can use Symantec Visual CafeTM to edit, compile, and debug your Java servlets. After you create a iPlanet 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 iAS 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.

If iAB complains that the DLL versions do not match when you use Visual Cafe, you must copy the javai.dll and javai_g.dll files from the <VisualCafe>\java\bin directory to the <iab60>\bin directory where <VisualCafe> is the directory in which Visual Cafe has been installed and <iAB60> is the directory in which iAB has been installed.


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:

    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:

    • 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.

  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.

    The following lines assume you have installed iAS in the c:\iPlanet\Server4 directory:

    c:\iPlanet\ias6\ias\APPS
    c:\iPlanet\ias6\ias\lib\java\kfcjdk11.jar
    c:\iPlanet\ias6\ias\lib\java\jdbc20.jar
    c:\iPlanet\ias6\ias\lib\java\javax.jar

  4. Select "Output files" from the drop-down list and set the "Output Directory" to:

    c:\iPlanet\ias6\ias\APPS

  5. 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 iPlanet Application Builder project, open the project in Visual Cafe and use the "File - Save As" command to save it under a different name.

  6. Add the servlets and other Java classes located in your iPlanet Application Builder Project directory to the Symantec project using the Insert - Files Into Project... menu item. (Be sure 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.


Invoking iAS with a Visual Cafe Project

  1. Stop iAS if it is running.

    • If iAS is running as a Windows system service, stop the service from the Windows Control panel.

    • If iAS was started using iPlanet Application Builder, use the Stop Server menu item in iAB's Test menu to stop the service.

  2. Restart iAS 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

  • set, view, disable, enable, and remove breakpoints

  • step into, out of, or over code

  • view stack information

  • examine variables

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:

  • 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)

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.



TM"> Using iAB with Macromedia DreamweaverTM



If you have DreamweaverTM installed, you can use it with iAB, 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 iAB editor and Dreamweaver.

  5. Click OK to make the change.

If you selected the "Double-click invokes external editor" box in iAB, Dreamweaver will open an HTML file when you double-click on the file within iAB. 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 iAB 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.

    Deselect "Fix Iinvalidly Nested and Unclosed Tags" and "Remove Extra Closing Tags."





Using iAB with the Visual Cafe Java Editor

If you have Visual Cafe installed, you can use it with iAB 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 iAB editor and Visual Cafe.

  5. Click OK to make the change.

    If you cannot open the file using Visual Cafe, check that Visual Cafe's bin folder is at the start of your path.



Using iAB with the Visual Cafe Java Compiler

If you have Visual Cafe installed, you can use it with iAB 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.


Previous     Contents     Index     DocHome     Next     
Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.

Last Updated April 28, 2000