6.8.1 Debugging J2EE applications

If you use the Debug on Server dialog box to execute debugging, you can simultaneously start the J2EE server, publish the project on the J2EE server, and access the Web browser, and can efficiently execute the debugging.

Organization of this subsection
(1) Debugging with the Debug on Server dialog box
(2) Resources to be debugged
(3) Notes on debugging J2EE applications

(1) Debugging with the Debug on Server dialog box

To debug with the Debug on Server dialog box when the server already exists:

  1. In the Project Explorer view, select a resource you want to debug, and in the context menu, choose Debug As, and then Debug on Server.
    The Debug On Server dialog box appears.

    [Figure]

    For details on the resources to be debugged, see (2) Resources to be debugged.
  2. Specify the following items:
    Item nameSpecified value
    Select the server that you want to useSpecify the registered J2EE server.
    Specify Cosminexus J2EE server.
    Always use this server when running this projectSpecify whether to use the J2EE server selected in Select the server that you want to use when this project is executed.
    • If you want to use this server whenever this project is executed
      Select this check box.
    • If you do not want to use this server whenever this project is executed
      Do not select this check box.
  3. Click the Finish button.
    When the J2EE server starts and the publishing of the project is complete, the Web browser appears.

(2) Resources to be debugged

The following table describes the resources targeted for debugging when you debug with the Debug on Server dialog box:

ResourceBrowser displayExplanation
Enterprise application projectXWhen the dynamic Web project is available in the module project, the URL of that context root is displayed in the Web browser. #
For multiple dynamic Web projects, the first dynamic Web project in the alphabetical sequence of project names is displayed on the Web browser.
If you want to target a dynamic Web project other than the first dynamic Web project, select that dynamic Web project and execute debug.
For example:
http://localhost/context-root/
The web browser is not displayed if a dynamic Web project is not available in the module project.
EJB ProjectNThe web browser is not displayed.
Dynamic Web projectYThe context root URL of the specified project is displayed in the Web browser. #
For example:
http://localhost/context-root/
JSP or HTML files under the contents directory of the dynamic Web projectYThe selected file is displayed in the Web browser.
For example:
http://localhost/context-root/file-path
Servlet classes under the Java source directory of the dynamic Web projectYThe selected servlet class is displayed in the Web browser.
For example:
  • When a servlet mapping tag is specified
    http://localhost/context-root/servlet-URL
  • When a servlet mapping tag is not specified
    http://localhost/context-root/servlet/fully-qualified-servlet-class-name
OtherNResources other than those mentioned above are not debugged.
Legend:
Y: Web browser is displayed.
X: Web browser display is restricted.
N: Web browser is not displayed.
#
If the Welcome page does not exist in a dynamic Web project, an error occurs (error status code 404).

(3) Notes on debugging J2EE applications

Note the following points when you debug J2EE applications: