If you are in a hurry to have Apache Geronimo up and running right away, this article will provide you with some can show you the basic steps for of downloading, building (when needed) and run running the server in no a short time.
All you need is 5 to 10 minutes and to follow these basic steps.
Table of Contents | ||
---|---|---|
|
Getting the software
There are currently the following two way ways to get the released software. You can either retrieve it :
- Retrieve the source code from the Apache SVN repository
...
- .
- Download the binary
...
- files from the Apache Geronimo Web site.
...
This section only shows how to download the binary files from the Apache Geronimo Web site because this way is faster and easier than retrieving the source code from the Apache SVN repository.
Prerequisites
Before you install Geronimo, you must install the Java Runtime Environment (JRE) or Java Development Kit (JDK). JDK is only required for wsgen tools.
Installing Java SE 5 or 6
Prerequisites
Although this installation path is the fastest one, still you will need to install some software before installing Geronimo.
...
Apache Geronimo v2.1 2 is Java EE 5 Certified. Refer to the following URL for details on For more information about how to download and install J2SE 1.5:
the latest JRE or JDK of Java SE 5 or Java SE 6, go to http://java.sun.com.
Download binaries
...
Info |
---|
It is possible to run Apache Geronimo v2.2 on the IBM 1.5.0/1.6.0 SDK and other implementations of Java that are certified as Java SE 5 or 6 compliant, but Geronimo is not tested or certified on those implementations. |
Downloading binary files
You can go to you will select the appropriate installation image. Open a Web browser and access the following URL, there you will find the available packages for download (binaries and source code).http://geronimo.apache.org/downloads.html to download the available packages (binary files and source code). You must select the installation file according to the platform that you plan to install and run Apache Geronimo on.
Geronimo v2.2 Geronimo v2.1 is available in the following three assembly configurations:
- Java EE 5 : full Java EE 5 functionality - Certified version.
- Minimal (Little-G) : Web Container, Transaction, and Connector capabilities
- Framework : Geronimo kernel core functionality
In this section, we use Java EE 5 and Little-G assemblies are provided with Jetty or assembly configuration with Tomcat Web Containerscontainer. You can find For more information about the Jetty project here. More information on the Tomcat project is available here. Both are excellent Web Containers that are compliant with the Servlet 2.5 and JSP 2.1 specifications. Your choice may be driven by your past experience and particular functionality requirements.
Framework assembly offers just a framework for you to build up your own custom Geronimo server based on the available plugins. Unlike Little-G, this distribution does not include a web container, it only provides the bare minimum support for installing plugins.
Select the file compression format compatible with your system (zip, tar, gz) by clicking directly on the link, download it and expand the binary to your hard drive in a new directory. For example in z:/geronimo, from now on this directory will be referenced as <geronimo_home>.
The installation of Apache Geronimo is as simple as uncompressing the .zip or .tar.gz files. The next step is to start the server.
Start the server
With Apache Geronimo already installed, open a command line console and change directory to <geronimo_home>/bin and run the following command:
geronimo run
This script starts the server on the same terminal you run the command. Once the server is started you should see a screen similar to this one.
...
bgColor | #000000 |
---|---|
borderStyle | solid |
...
difference between these three assembly configurations, see Getting and installing Geronimo.
You can download the installation file with the compression format (.zip or .tar.gz) that is compatible with your operating system by clikcing the link on the website. To install Apache Geronimo, extract the binary files to a new directory on your hard disk, for example, z:/geronimo. In the rest of this section, this directory is referred to as <geronimo_home>.
Starting the server
To start Apache Geronimo:
- In the command-line interface, go to the <geronimo_home>/bin directory.
- Type one of the following commands:
geronimo run
start-server
gsh geronimo/start-server
These commands start the server within the command-line interface instead of in the background. When the server is started, you can see the following information.
No Format | ||
---|---|---|
| ||
Launching Geronimo Server...
Booting Geronimo Kernel (in Java 1.5.0_13)...
Module 1/65 org.apache.geronimo.framework/j2ee-system/2.2-SNAPSHOT/car started in .000s
Module 2/65 org.apache.geronimo.framework/jee-specs/2.2-SNAPSHOT/car started in .000s
Module 3/65 org.apache.geronimo.framework/rmi-naming/2.2-SNAPSHOT/car started in .180s
Module 4/65 org.apache.geronimo.framework/j2ee-security/2.2-SNAPSHOT/car started in .126s
Module 5/65 org.apache.geronimo.configs/j2ee-server/2.2-SNAPSHOT/car started in .031s
Module 6/65 org.apache.geronimo.plugins.classloaders/geronimo-javaee-deployment_1.1MR3_spec/2.2-SNAPSHOT/car started in .000s
Module 7/65 org.apache.geronimo.framework/xmlbeans/2.2-SNAPSHOT/car started in .000s
Module 8/65 org.apache.geronimo.framework/plugin/2.2-SNAPSHOT/car started in .495s
Module 9/65 org.apache.geronimo.framework/geronimo-gbean-deployer/2.2-SNAPSHOT/car started in .233s
Module 10/65 org.apache.geronimo.framework/transformer-agent/2.2-SNAPSHOT/car started in .000s
Module 11/65 org.apache.geronimo.configs/transaction/2.2-SNAPSHOT/car started in .254s
Module 12/65 org.apache.geronimo.plugins.classloaders/xbean-finder/2.2-SNAPSHOT/car started in .000s
Module 13/65 org.apache.geronimo.configs/derby/2.2-SNAPSHOT/car started in .000s
Module 14/65 org.apache.geronimo.configs/system-database/2.2-SNAPSHOT/car started in 1.416s
Module 15/65 org.apache.geronimo.plugins.classloaders/geronimo-schema-jee_5/2.2-SNAPSHOT/car started in .000s
Module 16/65 org.apache.geronimo.configs/webservices-common/2.2-SNAPSHOT/car started in .000s
Module 17/65 org.apache.geronimo.configs/activemq-broker/2.2-SNAPSHOT/car started in 1.182s
Module 18/65 org.apache.geronimo.configs/openjpa/2.2-SNAPSHOT/car started in .004s
Module 19/65 org.apache.geronimo.framework/server-security-config/2.2-SNAPSHOT/car started in .027s
Module 20/65 org.apache.geronimo.configs/openejb/2.2-SNAPSHOT/car started in .805s
Module 21/65 org.apache.geronimo.configs/axis/2.2-SNAPSHOT/car started in .113s
Module 22/65 org.apache.geronimo.configs/axis2/2.2-SNAPSHOT/car started in .000s
Module 23/65 org.apache.geronimo.configs/axis2-ejb/2.2-SNAPSHOT/car started in .000s
Module 24/65 org.apache.geronimo.configs/j2ee-corba-yoko/2.2-SNAPSHOT/car started in .575s
Module 25/65 org.apache.geronimo.configs/jasper/2.2-SNAPSHOT/car started in .004s
Module 26/65 org.apache.geronimo.configs/tomcat6/2.2-SNAPSHOT/car started in 2.167s
Module 27/65 org.apache.geronimo.configs/aspectj/2.2-SNAPSHOT/car started in .014s
Module 28/65 org.apache.geronimo.configs/clustering/2.2-SNAPSHOT/car started in .055s
Module 29/65 org.apache.geronimo.configs/tomcat6-no-ha/2.2-SNAPSHOT/car started in .000s
Module 30/65 org.apache.geronimo.configs/j2ee-deployer/2.2-SNAPSHOT/car started in .179s
Module 31/65 org.apache.geronimo.configs/connector-deployer/2.2-SNAPSHOT/car started in .073s
Module 32/65 org.apache.geronimo.configs/tomcat6-deployer/2.2-SNAPSHOT/car started in .072s
Module 33/65 org.apache.geronimo.configs/tomcat6-clustering-builder-wadi/2.2-SNAPSHOT/car started in .956s
Module 34/65 org.apache.geronimo.configs/activemq-ra/2.2-SNAPSHOT/car started in .253s
Module 35/65 org.apache.geronimo.configs/javamail/2.2-SNAPSHOT/car started in .023s
Module 36/65 org.apache.geronimo.configs/jasper-deployer/2.2-SNAPSHOT/car started in .016s
Module 37/65 org.apache.geronimo.configs/myfaces/2.2-SNAPSHOT/car started in .013s
Module 38/65 org.apache.geronimo.configs/myfaces-deployer/2.2-SNAPSHOT/car started in .015s
Module 39/65 org.apache.geronimo.configs/openejb-deployer/2.2-SNAPSHOT/car started in .077s
Module 40/65 org.apache.geronimo.configs/openejb-corba-deployer/2.2-SNAPSHOT/car started in .097s
Module 41/65 org.apache.geronimo.configs/persistence-jpa10-deployer/2.2-SNAPSHOT/car started in .053s
Module 42/65 org.apache.geronimo.configs/axis-deployer/2.2-SNAPSHOT/car started in .052s
Module 43/65 org.apache.geronimo.configs/jaxws-deployer/2.2-SNAPSHOT/car started in .000s
Module 44/65 org.apache.geronimo.configs/axis2-deployer/2.2-SNAPSHOT/car started in .043s
Module 45/65 org.apache.geronimo.configs/jaxws-ejb-deployer/2.2-SNAPSHOT/car started in .000s
Module 46/65 org.apache.geronimo.configs/axis2-ejb-deployer/2.2-SNAPSHOT/car started in .041s
Module 47/65 org.apache.geronimo.configs/client-deployer/2.2-SNAPSHOT/car started in .051s
Module 48/65 org.apache.geronimo.configs/hot-deployer/2.2-SNAPSHOT/car started in .303s
Module 49/65 org.apache.geronimo.configs/welcome-tomcat/2.2-SNAPSHOT/car started in .150s
Module 50/65 org.apache.geronimo.configs/spring/2.2-SNAPSHOT/car started in .000s
Module 51/65 org.apache.geronimo.plugins/pluto-support/2.2-SNAPSHOT/car started in .209s
Module 52/65 org.apache.geronimo.plugins/console-tomcat/2.2-SNAPSHOT/car started in 2.503s
Module 53/65 org.apache.geronimo.plugins/plugin-console-tomcat/2.2-SNAPSHOT/car started in .315s
Module 54/65 org.apache.geronimo.plugins/sysdb-console-tomcat/2.2-SNAPSHOT/car started in .377s
Module 55/65 org.apache.geronimo.plugins/activemq-console-tomcat/2.2-SNAPSHOT/car started in .559s
Module 56/65 org.apache.geronimo.configs/remote-deploy-tomcat/2.2-SNAPSHOT/car started in .066s
Module 57/65 org.apache.geronimo.configs/uddi-tomcat/2.2-SNAPSHOT/car started in .477s
Module 58/65 org.apache.geronimo.configs/ca-helper-tomcat/2.2-SNAPSHOT/car started in .103s
Module 59/65 org.apache.geronimo.configs/sharedlib/2.2-SNAPSHOT/car started in .007s
Module 60/65 org.apache.geronimo.configs/mejb/2.2-SNAPSHOT/car started in .242s
Module 61/65 org.apache.geronimo.configs/concurrent/2.2-SNAPSHOT/car started in .120s
Module 62/65 org.apache.geronimo.configs/concurrent-deployer/2.2-SNAPSHOT/car started in .021s
Module 63/65 org.apache.geronimo.framework/gshell-framework/2.2-SNAPSHOT/car started in .000s
Module 64/65 org.apache.geronimo.framework/gshell-geronimo/2.2-SNAPSHOT/car started in .000s
Module 65/65 org.apache.geronimo.framework/gshell-remote/2.2-SNAPSHOT/car started in .000s
Startup completed in 17.632s seconds
Listening on Ports:
1050 127.0.0.1 CORBA Naming Service
1099 |
...
0.0.0.0 |
...
RMI Naming |
...
1527 0.0.0.0 |
...
Derby Connector |
...
|
...
2001 |
...
127.0.0. |
...
1 OpenEJB |
...
ORB Adapter |
...
4201 0.0.0.0 |
...
OpenEJB |
...
Daemon |
...
|
...
6882 |
...
127.0.0. |
...
1 OpenEJB ORB |
...
Adapter |
...
|
...
8009 |
...
0.0.0.0 Tomcat |
...
Connector |
...
AJP |
...
AJP 8080 0.0.0.0 Tomcat Connector HTTP BIO HTTP |
...
8443 |
...
0. |
...
0. |
...
0.0 Tomcat |
...
Connector HTTPS BIO HTTPS |
...
9999 |
...
0. |
...
0. |
...
0.0 JMX |
...
Remoting Connector 61613 |
...
0.0.0.0 ActiveMQ Transport Connector 61616 |
...
0.0.0.0 ActiveMQ Transport Connector Started Application |
...
Modules: |
...
EAR: org.apache.geronimo. |
...
configs/ |
...
uddi- |
...
tomcat/2. |
...
2-SNAPSHOT/car |
...
EAR: org.apache.geronimo. |
...
plugins/ |
...
console-tomcat/2. |
...
2-SNAPSHOT/car |
...
JAR: org.apache.geronimo.configs/ |
...
mejb/2. |
...
2-SNAPSHOT/car |
...
RAR: org.apache.geronimo.configs/ |
...
activemq- |
...
ra/2. |
...
2-SNAPSHOT/car |
...
RAR: org.apache.geronimo.configs/ |
...
system- |
...
database/2. |
...
2-SNAPSHOT/car WAR: org.apache.geronimo.configs/ |
...
ca-helper-tomcat/2. |
...
2-SNAPSHOT/car WAR: org.apache.geronimo. |
...
configs/ |
...
remote- |
...
deploy-tomcat/2. |
...
2-SNAPSHOT/car WAR: org.apache.geronimo. |
...
configs/ |
...
welcome-tomcat/2. |
...
2-SNAPSHOT/car WAR: org.apache.geronimo.plugins/ |
...
activemq-console-tomcat/2. |
...
2-SNAPSHOT/car WAR: org.apache.geronimo.plugins/plugin-console-tomcat/2. |
...
2-SNAPSHOT/car WAR: org.apache.geronimo.plugins/sysdb-console-tomcat/2. |
...
2-SNAPSHOT/car Web Applications: / /CAHelper /activemq /console /console-base |
...
/ |
...
juddi
/ |
...
plugin / |
...
remote- |
...
deploy /system-database Geronimo Application Server started Geronimo Server started in 0:00:20.803 |
To verify that the Apache Geronimo server is running, go to http://localhost:8080/console to open the Geronimo administrative console. The Geronimo administrative console plugin /remote-deploy /system-database Geronimo Application Server started To test the Apache Geronimo server you can just point your Web browser to the following URL to test the Geronimo Console. The Geronimo Administration Console is the first application you can test, and the good thing is, it is already . It is deployed in the standard, full J2EE certified distribution.
Java EE certified distribution of Apache Geronimo.
When the Geronimo administrative console is open, When prompted enter system as the user name and manager as the password.
The following figure illustrates shows the Web-based Geronimo administrative console.
At this point Now you have Apache Geronimo up and running and the time spent has been minimal. The following section offers a very basic sample JSP and shows you how to create, deploy, and run that a sample JSP Web application on Apache Geronimo.
...
Creating and
...
deploying a sample application
A To create a HelloWorld like JSP is almost a default for these basic testing and everybody is already familiar with it. JSP Web application:
- Create a new directory to hold all the application related files.
...
- In the rest of this section, this directory
...
- is referred to as <app_home>.
...
- In the <app_home> directory, create a plain text file named HelloWorld.jsp, and then copy the
...
- following code to this file.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<html> <head> <jsp:useBean id="datetime" class="java.util.Date"/> <title> Basic HelloWorld JSP </title> </head> <body bgcolor="#1276C2"> <h1> <font face="tahoma" color="white"> Hello world from GERONIMO! </font> </h1> <font face="tahoma" color="white">on ${datetime}</font> </body> </html> |
We will now To deploy an application, you must create a Geronimo specific deployment plan so you would get a first glimpse of the deployment plans. . To create the deployment plan for the sample application:
- Create a directory named WEB-INF
...
- in the <app_home> directory.
...
- In the <app_home>/WEB-INF directory, create a plain text file named geronimo-web.xml, and then copy the
...
- following code to this file.
Code Block xml xml borderStyle solid title Geronimo deployment plan geronimo-web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"> <environment> <moduleId>
...
<groupId>org.apache.geronimo.samples</groupId> <artifactId>HelloWorldApp</artifactId> <version>2.
...
2</version> <type>war</type> </moduleId> </environment> <context-root>/hello</context-root> </web-app>
...
- In the <app_home>/WEB-INF directory, create a plain text file named web.xml, and then copy the
...
- following code to this file.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <welcome-file-list> <welcome-file>HelloWorld.jsp</welcome-file> </welcome-file-list> </web-app> |
...
Deploying and
...
testing the application
For In this example, we will do not invest time in packaging the application. Instead, we will just use the --inPlace
feature of the deployer tool which allows us to deploy the application. You can use this feature to deploy an application from any directory.Change directory to
To deploy the application:
- In the command-line interface, go to the <geronimo_home>/bin
...
- directory.
- Type the following command:
No Format | ||
---|---|---|
| ||
deploy --user system --password manager deploy --inPlace <app_home> |
Once When the application is successfully deployed, you should can see the following message:
No Format |
---|
...
...
| ||
D:\geronimo-tomcat6-javaee5-2. |
...
2\bin>deploy --user system --password manager deploy --inPlace \HelloWorld Using GERONIMO_BASE: D:\geronimo-tomcat6-javaee5-2. |
...
2 Using GERONIMO_HOME: D:\geronimo-tomcat6-javaee5-2. |
...
2 Using GERONIMO_TMPDIR: var\temp Using JRE_HOME: C:\Java\jdk1.5.0_06\jre Deployed sample.applications/HelloWorldApp/2. |
...
2/war @ /hello |
Test To test the application by pointing a Web browser to the following URL:, go to http://localhost:8080/hello.
Stopping the server
In the command-line interface where the server is started, press CTRL+C to stop the server.
Summary
This article showed shows you how simple it is to have Apache Geronimo up and running. The overall time for getting the server running should be It takes less than five minutes to start the server if you have installed the prerequisites already installed. Additionally, this article also showed shows you how to create, deploy and test a very simple JSP Web application in less than five minutes.