Top
Interstage Studio User's Guide
FUJITSU Software

6.2.6 Checking Application Behavior

To check the behavior of a Java EE application, deploy the Java EE application to the server, then start the server. Perform these operations in the Servers view. When the server starts, the Java EE application waits to be invoked from the client. The behavior is checked by invoking Java EE application from the client.
In addition, the application can be debugged by interrupting program execution and executing code one line at a time and checking variable values.

Preparations for Server Operation

In order to start and stop the server from the workbench, the server must be added to the Servers view. Once the server is added you will need to specify things such as the applications to be deployed to it.

Adding Servers

Add to the Servers view the server that is the application deployment destination for checking the application behavior. Use the New Server wizard to add the server. Right-click the Servers view, then select [New] > [Server] from the context menu. For wizard setup items, refer to the following:

If the server is an Interstage Application Server, the following setup items are also displayed:

Point

  • The Interstage Java EE DAS service can be used to perform operation verification on the local machine. To use the Interstage Java EE DAS service, select "server" when selecting the IJServer Cluster.

  • A server can also be added using the New wizard.

Note

  • Refer to "6.2.1 Preparing the Deployment Destination for Verifying Application Operation" for information on the advantages of the Interstage Java EE DAS service and of IJServer Cluster, and for related notes.

  • For IJServer(J2EE), [Use HTTPS communication to connect to the target] is replaced by [HTTPS is used for the connection to the management console] and, if specified, SSL communication targets only connections to the Admin Console.

  • Wizard input items may be masked depending on the specified host and IJServer Cluster type.

  • If the server type was set to a value prior to Interstage Application Server V9.3, set the following values.

    • Interstage JMX Service Port Number
      Specify the Interstage Java EE Admin Console port number. The default port number is 8919.

    • Admin Console port number
      Specify the Interstage Admin Console port number. The default port number is 12000.

Specifying the Project to be Deployed to the Server

The project to be deployed to the server is specified by adding the project to the Servers view server. Use the Add and Remove Projects wizard to add the project to be deployed to the server. To launch the Add and Remove Projects wizard, select the server at the Servers view, then select [Add and Remove Projects] from the context menu.
A project can also be added using the last page of the New Server wizard.

Point

To deploy an application manually, select the server, then select [Publish] from the context menu. If [Clean] is used, all deployed applications are temporarily discarded and then redeployed. If the application is synchronized with the server, "synchronized" is displayed as the status. If not synchronized, "Republish" is displayed.

Starting Servers

In the Servers view, select the server, then select either [Start] or [Debug] from the context menu. The application can be deployed automatically when the server starts. The default setting is that applications are deployed automatically when the server starts.

Point

  • If the connection to the IJServer Cluster is not yet established, nothing is displayed in the [Status] column for the IJServer Cluster at the Servers view, and start and stop operations are not performed. In this case, select the IJServer Cluster at the Servers view, then select [Connect/Login] from the context menu to connect to the IJServer Cluster.

  • If the Interstage Management Service of the server is stopped while connected to the IJServer Cluster, connection to the IJServer Cluster will be interrupted, causing failure of operations of the IJServer Cluster in the Servers view. If operations fail, in the Servers view, select IJServer Cluster, and from the context menu, select [Refresh]. After updating the status of the IJServer Cluster, from the context menu, select [Connect/Login] to reconnect to the IJServer Cluster.

  • The user can select the project, then select [Run As] > [Run on Server] or [Debug As] > [Debug on Server] from the context menu to add the server, add the project, launch the server, and launch the client all together.

  • To set such that the application is not deployed automatically when the server starts, select [Server] > [Launching] from the Preferences page, then set [Automatically publish when starting servers] to off.

Note

If starting the server in debug mode, and from the project context menu, selecting [Run As] > [Run on Server] or [Debug As] > [Debug on Server], take note of the following points.

  • If selecting [Run As] > [Run on Server], debug mode must be cancelled. Before execution, in the Servers view, restart or stop the server.

  • When [Debug As] > [Debug on Server] is selected, the [Debug On Server] dialog box is displayed. Select [Continue in the current mode], then select [OK].

Stopping Servers

To stop the server, select the server at the Servers view, then select [Stop] from the toolbar.

6.2.6.1 Debugging

This section describes the debugging that is used to detect logical errors in programs.
To debug an application, set breakpoints to interrupt the launched program, and then execute the code one line at a time and check the variable content.

Breakpoints

Program execution is interrupted at the lines where breakpoints have been set. When execution is interrupted, a confirmation dialog box asking whether or not to open the Debug perspective is displayed. The Debug perspective is comprised of layouts used during debugging, such as the Debug view, the Variables view, and the Breakpoints view.

Note

If breakpoints have been set in a JSP file, execution is also interrupted for JSP files with the same name in different folders.

Execution Control

Various methods are available for restarting execution of execution-interrupted programs, including step over, step into, step return, and resume. To execute these commands, select stack frame from the Debug view, then select a command from [Run] in the Debug view toolbar, context menu, or menu bar.

Checking and Changing Variable Values

When a stack frame is selected, the variables that are visible in that stack frame can be displayed in the Variables view.
Primitive type values are displayed in the Variables view. If complex variables are expanded and their members are displayed, these can be inspected. Values can be changed using [Change Value] under the context menu.

Point

Debug information must be added to a compiled class file in order to reference variable values and perform debugging. The default setting is that the debug information required for debugging is added to the class file. If debugging is not required, for example, when deploying to an operating environment, the size of the class file can be reduced by not adding the debug information.

The debug information is used to display source file names and line numbers in the stack trace that is output when, for example, an exception is thrown. It is recommended to add source file names and line numbers to a class file.

6.2.6.2 Starting the Interstage Java EE Admin Console

In the Servers view, from the context menu, when [Admin Console] is selected, the Interstage Java EE Admin Console is displayed in the editor area.
To display the Interstage Java EE Admin Console, an Internal Web Viewer is used. This is a built-in browser used to display pages on the Web server.
An address bar and toolbar are provided with the Internal Web Viewer.

Address Bar

The address bar shows the [Address] field for entering of the URL of the page to be displayed, along with the following button.

Button

Command

Description

Go

Moves to the page belonging to the entered URL.

Tool Bar

The toolbar shows the following buttons.

Button

Command

Description

Go Back

Returns to the previous page that was displayed in the Internal Web Viewer before the current page.

Go Forward

Redisplays the page that was displayed before [Back] was clicked in the Internal Web Viewer.

Stop

Stops loading of the current page in the Internal Web Viewer.

Refresh

Reloads the current page displayed in the Internal Web Viewer.

Text Size

Changes the size of displayed characters in the Internal Web Viewer. You can select from the following five sizes: [Largest], [Larger], [Medium], [Smaller], and [Smallest].

Note

  • If displaying the Interstage Java EE Admin Console in the Internal Web Viewer, the address bar is not displayed.

  • If the Interstage Management Service of the server is stopped, even if [Admin Console] is selected from the context menu, the Interstage Java EE Admin Console will fail to display. In such cases, connection to the IJServer Cluster will be interrupted, therefore reconnection to the IJServer Cluster is required. To reconnect to the IJServer Cluster, in the Servers view, select IJServer Cluster, and from the context menu, select [Refresh]. After updating the status of the IJServer Cluster, from the context menu, select [Connect/Login]. After reconnection is finished, execute [Admin Console] again.