Solutions Products Services

Search
Download Contact Us
Documentation Site map
Support About Us
E-commerce SolutionsiPlanet



Executing and Debugging

Execution Time

There are three central actions related to development of particular objects within the Forte IDE; deploy, execute, and debug.

For the iPlanet Web Server, the deploy action can be used upon WebModules. Deployment can be done first or at execution time. When done first, a context is established with the IDE by which an associated executable component, such as a servlet, JSP, or web module can then be exercised.

Upon execution, the following events occur:
 

The corresponding web page is the concatenation of the following:
 

Debugging

You can use the Forte debugger tool to locate and correct bugs in your program. This tool can be used on servlets; JSP debugging is not supported with iPlanet Web Server 6.0.

NOTE: Debugging is not supported on Solaris due to a limitation with J2EE 1.2.2.

When you execute a program with the debugger tool, you can start execution at any servlet. The program stops executing at set breakpoints in the servlet and you can interactively inspect and debug sections of code. To run the debugger tool, designate the entry point into your program by selecting a servlet from the Explorer Filesystems tab, then from the Debug menu select Start.

This action will:


You can add watches, analyse the threads, etc in the Debugger Window (Menu View--->Debugger Window)

Debugging Example

For this example, we will set a debug breakpoint. This debug example uses the HelloServlet servlet that we created in Creating Servlets in this tutorial.

  1. From the Forte toolbar, select the Editing tab.
  2. From the Explorer, double click to select the HelloServlet node open it in the Source Editor.
  3. Select the out.println("Hello. You are visitor "+(counter++)); line in the editor.
  4. Right click and select Toggle Breakpoint from the context menu.

    The line appears highlighted in red indicating the location is set with a breakpoint.

  5. From the Explorer, select the HelloServlet node.
  6. From the Debug menu, select Start.

    Once the debugger is running, the line with the breakpoint is highlighted in blue.

  7. From the Debug window, select Variables tab.
  8. Locate the counter variable and change the value to 10.

  9. From the toolbar, select Continue to finish executing your servlet.

    The resulting servlet is displayed in the web browser. Notice that the counter variable now appears as 10.

  10. From the Debug menu, select Finish.

    The Finish Debugging window appears.

  11. Select OK to stop the process in the debugger.

    Congratulations, you have successfully debugged your servlet on a web server and completed the iPlanet Web Server Integration Module Tutorial.

See also
  Creating Servlets
Setting the Debugging Port

Legal Notices


Search