INTRODUCTION
This article will show you how to get started with WebSphere Application Server Community Edition (WAS-CE) v2.0 and Eclipse Web Tools Platform (WTP) v2.0. You will see the various steps to download related components and configure the “Servers” view of Eclipse WTP with a WAS-CE server.
This article will focus on providing directions for a Windows machine. You can find information of what might be different for other platforms here:
http://publib.boulder.ibm.com/wasce/V2.0.0/en/quick-start.html
OVERVIEW OF WEBSPHERE COMMUNITY EDITION
So what exactly is WebSphere Community Edition or WAS-CE?
Unlike the other editions of WebSphere Application Server, which are built from a proprietary IBM code base, WAS-CE is a combination of several open source projects into a Java EE 5 compatible Java Application Server. The most notable project included in WebSphere Community Edition is the Apache Geronimo Project. WebSphere Community Edition is FREE to download and use, even in production systems. IBM provides several different support options, including fee-based support options.
Featured Upcoming
Free Webinars and Whitepapers!
Join our community of 80,000 IT professionals by registering today.
Ransomware: History and Current Trends
Monday, December 6
12:00 to 1:00 PM ET
Leveraging Architecture for More Predictable –
and More Agile – Development
Friday, January 21
12:00 to 1:00 PM ET
Data Engineering & Data Analytics
Upskilling Trends in 2021
Complimentary White Paper
10 Minute Guide
DOWNLOAD RELATED SOFTWARE
If you haven’t done so already, use the links in the Resources section below to download copies of WAS-CE and Eclipse WTP. This article will demonstrate WAS-CE v2.0.0.1 and Eclipse WTP v2.0.1.
The best option to download for WAS-CE, especially if you are going to purchase a support subscription from IBM, is the download package which includes both WAS-CE and the IBM Java installation. If you already have Java installed or wish to use another Java environment you will want to consult the following detailed system requirements.
Detailed WAS-CE System Requirements
Note: The biggest requirement is the version of Java used when running the server. You should use a Java 1.5 version as noted in the requirements. You may also see this referred to as “Java 5”. These are the same version and you may see both version references depending on the context.
When downloading Eclipse WTP it is generally easiest to download an “All-In-One” package that includes the Eclipse platform and the WTP plug-in extensions.
INSTALL JAVA
The first step to configuring an environment for WAS-CE is to install a Java environment. This section will provide steps to install the IBM Java installation provided with the WAS-CE download. You would follow similar instructions for other Java installations.
After starting the installation program and being presented with the normal screens for license acceptance and installation location, the IBM Java installation will present an option for which type of installation to perform. For this demonstration we will select the “Custom” installation to show and discuss various options.
One feature that you should leave selected is the installation of the “SDK”. This will provide various tools that WAS-CE may need to run tools and commands. Installing source code is optional.
The next option of interest is the option to install a “System JVM”. This would configure your system to automatically recognize and run Java programs using this Java installation. We will select “No” for this option and setup the system to recognize Java commands in a way that has less impact on the system and other Java programs.
Note: When you install a “System JVM” some files are copied into your Windows installation directories. Since this may conflict with other Java programs you already have installed or may install in the future we will see another way to configure the system to run Java programs like Eclipse.
After configuring these options you can finish running the installation program by clicking through the remaining screens. If you are presented with a screen asking about browser plug-ins you may again wish to choose these options based on whether your system already has Java installed and if this version will conflict with any Java Applets that run in your web browser.
INSTALL WEBSPHERE COMMUNITY EDITION
Now that you have a Java installation we will install the WebSphere Application Server Community Edition package.
The size of the setup program may be different depending on what type of download you used but the name should always be similar, something like ‘wasce_setup-2.0.0.1-win.exe‘.
When you start the setup program it will search for a Java version to install the server with. Check the following screen to be sure the correct version of Java is found that you wish to run with WAS-CE.
Note: If the installation does not find a Java installation or finds the wrong one you may need to change the value of your Windows PATH environment variable. If you used the default directory for the IBM JVM you would add something like ‘C:Program FilesIBMJava50bin’ to the PATH. You can run a ‘java -version’ command from a command prompt to see the default Java installation that is located on the PATH.
Go through the normal screens of license acceptance and installation location until you come to the installation summary screen. Press the Install button to install WAS-CE.
Press the Finish button when the installation is complete.
CHECK WAS-CE INSTALLATION
Before configuring anything else it will be good to check that you can start and stop the WAS-CE server and troubleshoot any installation problems.
From the Windows Start menu select ‘Programs -> IBM WebSphere -> Application Server Community Edition -> Start the server‘.
A separate command prompt window should open and begin starting the server. If you get a prompt from a firewall application select to ‘unblock’ the server. Once the server is finished starting you should see the output shown below.
Leave this command prompt open as it is running the server.
From the Windows Start menu select ‘Programs -> IBM WebSphere -> Application Server Community Edition -> Administrative console‘.
At this point you will most likely get a prompt about the “certificate” of the server. This is because the server is trying to establish a secure connection but you do not recognize the validity of the certificate. Go ahead and accept the certificate to proceed to the administrative console.
Login to the administrative console using the default username of ‘system’ and default password of ‘manager’. You should be presented with the main page of the administrative console as shown below.
Once you have verified you can access the administrative console close the web browser.
From the Windows Start menu select ‘Programs -> IBM WebSphere -> Application Server Community Edition -> Stop the server‘. Enter the username of ‘system’ and the password of ‘manager’ to shutdown the server. The command prompt running the server should close automatically after several seconds.
INSTALL AND CONFIGURE ECLIPSE WTP
In this section you will install and configure your Eclipse WTP environment. You will setup a shortcut that allows you to avoid altering the configuration of things like the PATH variable just to run Eclipse.
If you downloaded the “All-in One” Eclipse WTP bundle you have a Zip file with all of the files required for Eclipse and the Eclipse WTP extensions. If you downloaded a different file or have a pre-existing installation of Eclipse you would have to follow other instructions to configure this.
To install the “All-in-One” package all you have to do is unzip the downloaded file to any location. This can be any location you desire although it is generally best to stay away from long file paths to the root of the Eclipse directory to avoid long path names within the subdirectories of Eclipse.
In this article we will extract Eclipse directly to the C: drive. This will create the ‘C:eclipse’ directory which is the root of the Eclipse installation.
To run Eclipse all you have to do is run the ‘eclipse.exe’ application on a system configured to run Java programs. Since we avoided installing a “System JVM” we will create a shortcut with an option to point Eclipse to the Java installation, a setup that has much less potential for conflict with other programs.
Open a Windows Explorer window and navigate to the directory where you unzipped Eclipse.
Right click on the ‘eclipse.exe’ application and select ‘Send To -> Desktop (create shortcut)‘. Minimize all the windows so you can see the shortcut on the Desktop.
Right click on the new shortcut and select ‘Properties‘.
On the shortcut properties add a space after the current target and place the following option on the end. This will be slightly different depending on your Java installation folder.
-vm “C:Program FilesIBMJava50binjavaw.exe”
The final value of the ‘Target’ property should be something like:
C:eclipseeclipse.exe -vm “C:Program FilesIBMJava50binjavaw.exe”
You can also go to the ‘General’ tab and rename the shortcut if you want. When you settings appear as above press the OK button to accept the properties.
UPDATE ECLIPSE WTP WITH WAS-CE SERVER ADAPTER
If you will be developing applications using Eclipse it will be useful to be able to easily deploy and test these applications on the WAS-CE server. IBM provides an Eclipse plug-in, called the WAS-CE “Server adapter” that can help you do this. This section will show you how to install and configure this adapter to connect Eclipse and WAS-CE.
Double-click on the shortcut you configured in the last section to start Eclipse WTP.
When a dialog appears asking for a workspace enter a directory that you want to use for a workspace and click the OKbutton.
Once Eclipse opens close the Welcome screen by clicking the ‘X’ in the tab near the top left.
Select ‘Window -> Open Perspective -> Other…‘
On the “Open Perspective” dialog select Java EE and press the OK button.
Along the bottom group of tabbed views, select the tab for Servers.
Right-click in the open area of the Servers view and select ‘New -> Server‘.
In the dialog for a new server definition, click the link in the upper right to “Download additional server adapters“.
Wait a minute while the list is populated and then select “WASCE v2.0 Server Adapter” from the list and click the Nextbutton.
Note: If you need to configure proxy information to connect to the internet to download the WAS-CE server adapter you can do this by selecting ‘Window -> Preferences‘. Go to the ‘General -> Network Connections‘ section to enter information on how to connect using your proxy server.
Accept the license terms and press the Finish button. Confirm that you wish to download and install the WASCE v2.0 server adapter.
After several minutes of downloading and installing the update Eclipse will restart. Enter the location of the workspace if needed.
You should still see the ‘Servers‘ view in the ‘Java EE‘ perspective. Right-click in the open area of the Servers view and select ‘New -> Server‘.
Expand the ‘IBM‘ group and select the ‘IBM WASCE v2.0 Server‘ option. Press the Next button.
On the next screen use the Browse button to find the installation directory of WAS-CE. If you used the default installation directory this would be:
C:Program FilesIBMWebSphereAppServerCommunityEdition
Click the Next button once the installation directory is noted.
On the next screen you can change some of the details for the server configuration. Since we used the standard configuration these details are fine and you can press the Next button.
The final screen can be used to deploy projects to the server. Since you do not have any if you use a new workspace you can simply click the Finish button to create the server definition.
Now that your server definition has been added to the Servers view you can use the toolbar buttons of the view to start/stop the server.
Note: The first time you start the server you may need to “unblock” the server process if a firewall is active.
Once you start the server various messages will appear in the Console view.
Once the server is started you can right click the server in the Servers view and select ‘Launch WASCE Console‘ to open the administrative console in a browser inside of Eclipse.
If you need to change the properties of the server, like the username and password or ports, you can right click the server and select Open to open an editor to change the server definition.
Once you have application projects that you want to test you can also select ‘Add and Remove Projects‘ to deploy them to the server.
REVIEW
In this tutorial you learned to:
- Install a Java environment to support WAS-CE.
- Install and test WAS-CE.
- Install and configure Eclipse WTP.
- Control a WAS-CE server from Eclipse WTP.
RESOURCES
Download WebSphere Community Edition
Download Eclipse Web Tools Platform
Detailed WAS-CE System Requirements
Eclipse Update Site for WAS-CE
WAS-CE Zone on Developerworks