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:
In the Server Configuration view, expand Servers.
Right-click on the appropriate server, and select Add:
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:
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:
Switch to the Server perspective.
In the Servers view, right-click the server you want to start.
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:
Tip: The server is automatically started when you right-click on a file and then select 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:
Create a server and configuration
Edit a server
Delete a server
Start a server
Start a server in debug mode
Start a server in profiling mode
Restart a server
Stop a server
Disconnect from a server
Publish your application
Add and remove projects from a server
Switch configuration
Restart a project
Show Activity Log
Create tables and data sources
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:
Starting
Started
Started in debug mode
Started in profile mode
Stopping
Stopped
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).
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.
Use the Server Configuration view to perform the following tasks:
Create a server and configuration
Edit a server
Delete a server
Start a server
Start a server in debug mode
Start a server in profiling mode
Restart a server
Stop a server
Publish your application
Switch configuration
Add and remove projects
![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |