Getting started with Integrated Web Application Server
The Create Application Server wizard provides a convenient way to create the integrated Web application server for hosting dynamic Web applications. The goal of the wizard is to create a recommended production level server configuration while requiring minimal information from the user.
This article provides start-up instructions for the creation of an integrated Web application server and the deployment of a Web application.
To launch the wizard you need to sign on to the Web Administration GUI for i5/OS and click on the Create Application Server wizard link. Point your browser to the Web Admin GUI for i5/OS by specifying the following URL: http://hostname:2001/HTTPAdmin, where hostname is the host name of your server, and sign on (you must have *ALLOBJ authority to create a Web services server). Then launch the Create Application Server wizard by either clicking on the link in the navigation bar under the
Common Tasks and Wizards heading, or on the main page of the
Setup tab (see Figure 1 below).
Figure 1. Links to Create Application Server
Here are the steps to create an integrated Web application server.
The first page that is shown after clicking on the link to create an application server is some introductory information about the wizard. You can read the information if you choose.
Click on the
Next button at the bottom of the form.
You can choose which type of application server to create (see figure 2). Ensure that integrated Web application server for i V7.1 is selected.
Click on the
Next button at the bottom of the form.
Figure 2. Specify application server version and type
You have the option of naming (see Figure 3) the application server that is to be created. You can also provide a short description if you so choose. Accept the defaults and click on the
Next button at the bottom of the form.
Figure 3. Specify application server name
We need to specify (see Figure 4) the starting port number of a block of ports to be used by the server. The number you specify is the first one in a range of consecutive port numbers. For example, if you specify 12000 as the port number and the application server needs 10 ports, the numbers 12000-12009 are assigned to the integrated application server. None of the ports in the range can be in use or configured to be used by another integrated Web application server, HTTP server, WebSphere Application Server, WebSphere Portal or IBM Workplace environment. Only one service can run on a port at a time. If you change the ports provided by the wizard, it verifies that the port range you specify is correct and that no port in the range is in use. If another server is configured to use any of the ports in the specified range, an error message is displayed, and you cannot proceed until a range of free ports is chosen.
Select the initial port or accept the default.
Click on the
Next button at the bottom of the form.
Figure 4. Specify internal application server ports
Now we need to create the HTTP server corresponding to the application server. A new HTTP server is created with all of the necessary directives to be production ready. The HTTP server is configured with the plug-in directives that cause URL requests to be routed from the HTTP server to the integrated Web application server.
The form shown in Figure 5 allows you to name the HTTP server in addition to specifying the port and IP address for which the HTTP server will accept client requests.
Set the appropriate values or accept the defaults (make sure the port number specified is not in use by other applications or servers).
Click on the
Next button at the bottom of the form.
Figure 5. Create a new HTTP server
The integrated Web application server requires an i5/OS user ID (see Figure 6 below). This user ID is used to run the jobs associated with the server. You have the option of specifying an existing user ID, creating a new user ID, or using the default user ID. We will use the default user ID, QLWISVR.
Click on the
Next button at the bottom of the form.
Figure 6. Specify User ID for Server
The wizard will install the sample application shown in Figure 7 below. The sample is deployed to enable the administrator to quickly verify that the integrated Web application server was created, built, started successfully and can be accessed as expected.
Click on the
Next button at the bottom of the form.
Figure 7. Sample application installed
The wizard shows you a summary page (see Figure 9 below), giving you the chance to see the details relating to the integrated application server before it actually kicks off the task of creating the server.
The
Application Server tab on the summary page gives you details about the integrated application server. Here you will find information about ports, the location of the server instance, etc.
Figure 9.Summary - Application Servers tab
If you click on the
HTTP server tab, you will see information about the associated HTTP server (see Figure 10 below).
Figure 10. Summary - HTTP sever tab
Clicking on the
Finish button at the bottom of the summary page will result in the panel shown in Figure 11 being displayed by the wizard:
Figure 11. Server creating
After the server is created, the wizard will install the sample application and then start the integrated Web application server and HTTP server. So if all goes well, you will eventually see the server in Running state and the installed sample application active (green dot to the left of application name) as in Figure 12 below:
Figure 12. Server running
Congratulations, you have now successfully created an integrated Web application server.
Now let us install a new application. The
Install New Application wizard guides you through the application installation process. The integrated Web application server requires application to be in OSGi Web application bundle (WAB) format before it can be deployed. Using the Web admin GUI interface, you can specify an application either in WAB format or in the more common Web Archive (WAR) format. The wizard performs the necessary steps to convert a WAR file to an OSGi bundle and then install the bundle as an application on the integrated Web application server.
Click on the
Install New Application wizard link that is located under the heading
Application Server Wizards in the navigation bar on the left.
The first panel displayed by the
Install New Application wizard is a panel asking for the location of the application to be installed (see Figure 13). The application must be located on the system in which the integrated application server is running on.
An application can consist of a single Web module packaged as a stand-alone WAR file or as a WAB file. A Web module is a logical piece of an application that contains objects such as Java servlets, Java Server Pages (JSPs), and HTML pages.
In this example, you will need to specify your own application to be installed. For the purpose of this tutorial, the application to be installed is a simple jsp that simply returns a Web page with the words “Hello World”. The application is located in /HelloWorld.war file. After specifying the path to the application, click on the
Next button at the bottom of the form.
Figure 13. Specify Application Location
The Web page that is displayed (see Figure 14) allows you to name the application and to set the context root for the application. The default name for the application is the name of the WAR or WAB file. The context root is the path that is used in a client request to access the application resources. For example, in the request "http://myhost:80/myApplication/myJSP.jsp", "/myApplication" is the context root.
Also shown on the Web page is the path in which the application will be installed.
We will leave the defaults and click on the
Next button at the bottom of the form.
Figure 14. Specify Application Install Options
An application by default can be accessed by all ports that the application server is listening on. To limit this application to specific ports, use can specify custom port mapping option (see Figure 15). This option limits the context root for this application to only the selected ports that the application server is currently listening on.
We will leave the default (maps the application to all ports that application server is currently listening on) and click on the
Next button at the bottom of the form.
Figure 15. Specify context root port mapping
The wizard shows you a summary page (see Figure 16 below), giving you the chance to see the details relating to the application being installed before it actually kicks off the task of installing the application on the integrated Web application server.
Figure 16. Install summary
Clicking on the
Finish button at the bottom of the summary page will result in the panel shown in Figure 17 being displayed by the wizard:
Figure 17. Installing application
After the application is installed, you should (you may need to refresh the panel a few times) see the installed application active (green dot to the left of application name) as in Figure 18 below:
Figure 18. Application installed
Congratulations, you have now successfully installed your first application on the integrated Application server. Let us now look at the installed application in more detail. Click on the
Managed Installed Applications link that is to the left of the list of installed application names.
The
Manage Installed Applications form (figure 19 below) is used to view the list of installed applications, start or stop an application, install a new WAR or WAB application bundle, modify the properties of an installed application, or uninstall an application bundle. Select the application you want to work with by clicking the radio button next to the application name.
Figure 19. Manage deployed services
The installed applications table contains the following information:
- The
Application name column indicates the unique name that represents the installed application.
- The
Status column indicates the general status of the applications.
-
- The current status of a service can be updated by clicking
Refresh.
- An installed application might have a status of
Running or
Stopped. This indicates that the application has been made available as a Web application on the server.
- An application that is being installed has a status of
Installing.
-
- If the application is installed successfully, the status is changed to
Running. Until the installation has completed successfully, the application's properties cannot be modified.
- An application that is uninstalling has a transitional status of
Uninstalling.
-
- If the uninstall process completes successfully, the application is removed from the installed applications list.
- The
Context root column shows the path that is used in a client request to access an application's resources.
The options at the bottom of the table are as follows:
- To install a new service, click on the
Install button to launch the
Install New Application wizard.
- Click on the
Stop button to stop a running application. The button will not be shown if the application is not running.
- Click on the
Start button to start an application. The button will not be shown if the application is running.
- Click on the
Properties button to view or modify properties for the application. In most cases the server must be restarted in order for any changed properties to take effect.
- Click on the
Uninstall button to remove an application. The button will be disabled if the service has a status of
Running.
- Click on the
Refresh button to refresh the status of all installed applications.
|