Run/operate server

Adding projects to a server

Once you have created a server and server configuration, you need to create a relationship between the projects that contain the files you want to test and your server.

This is done by adding your project to a server:

  1. In the Server Configuration view, expand Servers.

  2. Right-click on the appropriate server, and select Add:


  3. Select the project that you want to test with the server. You can only select one project at a time. The project name appears under the server in the Server Configuration view:

    Server Configuration

NOTE: When you select a project to add to the server configuration, only the projects that are applicable to the type of server will appear. For example, for WebSphere Application Server V5, only EAR projects and projects associated with an EAR, can be added to the Server Configuration.

Starting a server

When you are ready to test your projects, you must start a server. In some situations, listed below, WebSphere Studio starts a server for you automatically.

Once you have started the server you can test the projects that are associated with its configuration. You can stop and restart the server at any time. The status of the server is displayed in the Status column of the Servers view.

To manually start a server:

  1. Switch to the Server perspective.

  2. In the Servers view, right-click the server you want to start.

  3. Select Start.


    The following things happen:

    • If you have selected the Automatically publish before starting servers check box on the Server preferences page (Window > Preferences > Server), WebSphere Studio checks to see if your project and files on the remote server are synchronized prior to starting the server. If they are not, the project and the files are automatically updated on the remote server when it is started.

    • A Console view opens in the workbench. It will take a minute to start the server. If the server fails to start, check for the reason that it failed in the Console.

    • In the Status column of the Servers view, the status of the server changes to Started.


Tip: You can also start the server by right-clicking the server in the Server Configuration view and then clicking on the Control > Start context menu item:


Tip: You can also start the server by selecting the server in the Servers view and then clicking on the Start the server button on the main toolbar:

Start the server

Tip: The server is automatically started when you right-click on a file and then select Run on Server:

Run on server

After the server is started, the file (JSP or Servlet) is opened in Web Browser automatically:


Servers view

The Servers view (similar to the one shown below) allows you to manage the servers and configurations. This view displays a list of all your servers and configurations that are associated with that server. You can use this view to start, start in debug mode, restart, or stop the servers.


Use the Servers view to perform the following tasks:

Servers view Tasks

The Servers view displays the current status of all the servers. The server status indicates whether or not a server has been started. The following lists the possible server status:

The Servers view also displays the current state of all the servers. Depending on the status of the server and the preference options that are selected for that particular server, the server tools determine the server actions that may be taken. Use this column as an indicator for possible actions that you may want to take. For example, if the server tools detect that a file defined to run on a particular server has changed, and the Automatically restart servers when necessary check box has been selected on the Server preferences page (Window > Preferences > Server), the server tools automatically restart that server. The Status column in the Server Control view changes from Started to Stopped, from Stopped to Started. However, if this check box is not selected, the Server State column in the Servers view changes to The server should be republished.

Server Configuration view

The Server Configuration view (similar to the one shown below) allows you to manage the servers and configurations. This view displays a list of all the servers that reside in your workspace (without displaying their associated server projects).

Server Configuration view

To view the server configurations, click the Menu icon and select View > Advanced. The advanced Server Configuration view opens, displaying the servers and their associated configurations.

Server Configuration view

Use the Server Configuration view to perform the following tasks:

Server Configuration view

Professional hosting     Belorussian informational portal         Free SCWCD 1.4 Study Guide     Free SCBCD 1.3 Study Guide     Free SCDJWS 1.4 Study Guide     SCDJWS 1.4 Quiz     IBM Test 000-287. Enterprise Application Development with IBM WebSphere Studio, V5.0 Study Guide     Free Mock Exam Engine