JEE Custom Search Portals

Tuesday, January 25, 2011


Apache Geronimo - Java EE 5 Application Server [Installing, Running and Deploying Application]

In the previous blog Apache Geronimo - Java EE 5 Application Server [General Overview], I just gave a general overview of the Application server, its integrated components and its advantages. In this blog, I will show how we can get started with working with Apache Geronimo. In this, I will be detailing about the installation, running and also about the admin console functionalities.

The following are the pre-requisites for this tutorial -
To install Apache Geronimo, download and unzip the Geronimo distribution [C:\Installed-Softwares\geronimo-tomcat6-javaee5-2.2.1].

To start Apache Geronimo, just type the following command on to the command line. [Note: On Windows, type 'cmd' in Start > Run to open up the command line]

Then navigate to the unzipped bin directory under the <geronimo_home/bin> [C:\Installed-Softwares\geronimo-tomcat6-javaee5-2.2.1\bin] and type the following command.

<geronimo_home/bin> geronimo start

See the screenshot below -


If the server started successfully, it will display as screenshot below


Once started, you can access the admin console using the link - http://localhost:8080/console.



Login to the admin console with the following credentials to access the administrative functionalities.

User Name: system
Password: manager


Next step is to create a simple web application and try deploying it to the Apache Geronimo application server. For this, we will be creating a simple web project. I will be concentrating on the specific files that need to be created for this example and not focus on each and every step of creating a dynamic web project.

A simple jsp - index.jsp is as given below. This file needs to be copied into <app_home> directory.


The following screenshot shows a common web.xml. This needs to be copied into the <app_home>/WEB-INF directory.


Next we need a geronimo specific file - geronimo-web.xml. This file needs to be copied under <app_home>/WEB-INF.


Once these steps are done, create a war file using the following command.

<app_home> java -jar <app_name>.war

The next step is to deploy the application into Apache Geronimo server. For this, select Applications > Deployer under the console navigation menu. Select the war file and click Install.
If you select the checkbox 'Start application after installation', then once the application is deployed and the application will be started.


To see the status of the deployed application, go to the Applications > Web App WARs under the left console navigation menu. This will display all the applications that are currently deployed to the server. If the application is deployed correctly, you can see the app as shown below.


There is also provision to stop, restart or uninstall the application from the above mentioned page.

To access the application, type in the following URL -


To stop the server, type the following command.

<geronimo_home/bin> geronimo stop

To summarize, we have learned how to install the Application server, start and stop the server and also deploy applications on the server using the administrative console. In the next blog post, I will be concentrating on the different Admin Console functionalities.

No comments:

Post a Comment