HomeApache Geronimo v2.0 > Documentation > Quick start - Apache Geronimo for the impatient

If you are in a hurry to have Apache Geronimo up and running right away, this article will provide you with some basic steps for downloading, building (when needed) and run the server in no time.

All you need is 5 to 10 minutes and to follow these basic steps.

Getting the software

There are currently two way to get the released software. You can either retrieve it from the Apache SVN repository or fhe fastest and easiest way is to get the binary directly from the Apache Geronimo site. Since this article is intended to help you to have Apache Geronimo up and running in the fastest possible way, only the binary download will be covered at this time.

Prerequisites

Although this installation path is the fastest one, still you will need to install some software before installing Geronimo.

J2SE 1.5

Apache Geronimo v2.0 now provides full support for Sun JDK 5.0+ (J2SE 1.5.0+). Refer to the following URL for details on how to download and install J2SE 1.5:
http://java.sun.com

Download binaries

Depending on the platform you plan to install and run Apache Geronimo 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

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.

D:\geronimo-tomcat6-jee5-2.0\bin>geronimo run
Using GERONIMO_BASE:   D:\geronimo-tomcat6-jee5-2.0
Using GERONIMO_HOME:   D:\geronimo-tomcat6-jee5-2.0
Using GERONIMO_TMPDIR: D:\geronimo-tomcat6-jee5-2.0\var\temp
Using JRE_HOME:        C:\Java\jdk1.5.0_06\\jre
Booting Geronimo Kernel (in Java 1.5.0_06)...
14:32:07,000 INFO  [root] ----------------------------------------------
14:32:07,000 INFO  [root] Started Logging Service
14:32:07,000 INFO  [root] Runtime Information:
14:32:07,000 INFO  [root]   Install Directory = D:\geronimo-tomcat6-jee5-2.0
14:32:07,000 INFO  [root]   JVM in use = Sun Microsystems Inc. Java 1.5.0_06
14:32:07,000 INFO  [root] Java Information:
14:32:07,000 INFO  [root]   System property [java.runtime.name]  = Java(TM) 2 Runtime Environment, Standard Edition
14:32:07,000 INFO  [root]   System property [java.runtime.version]  = 1.5.0_06-b05
14:32:07,000 INFO  [root]   System property [os.name]             = Windows XP
14:32:07,000 INFO  [root]   System property [os.version]          = 5.1
14:32:07,000 INFO  [root]   System property [sun.os.patch.level]  = Service Pack 2
14:32:07,000 INFO  [root]   System property [os.arch]             = x86
14:32:07,000 INFO  [root]   System property [java.class.version]  = 49.0
14:32:07,000 INFO  [root]   System property [locale]              = en_US
14:32:07,000 INFO  [root]   System property [unicode.encoding]    = UnicodeLittle
14:32:07,000 INFO  [root]   System property [file.encoding]       = Cp1252
14:32:07,000 INFO  [root]   System property [java.vm.name]        = Java HotSpot(TM) Client VM
14:32:07,000 INFO  [root]   System property [java.vm.vendor]      = Sun Microsystems Inc.
14:32:07,000 INFO  [root]   System property [java.vm.version]     = 1.5.0_06-b05
14:32:07,000 INFO  [root]   System property [java.vm.info]        = mixed mode
14:32:07,000 INFO  [root]   System property [java.home]           = C:\Java\jdk1.5.0_06\jre
14:32:07,000 INFO  [root]   System property [java.classpath]      = null
14:32:07,000 INFO  [root]   System property [java.library.path]   = C:\Java\jdk1.5.0_06\jre\bin;.;C:\WINDOWS\system32;C:\WINDOWS; ...
14:32:07,000 INFO  [root]   System property [java.endorsed.dirs]  = C:\Java\jdk1.5.0_06\\jre\lib\endorsed;D:\geronimo-tomcat6-jee5-2.0\lib\endorsed
14:32:07,000 INFO  [root]   System property [java.ext.dirs]       = C:\Java\jdk1.5.0_06\\jre/lib/ext;D:\geronimo-tomcat6-jee5-2.0/lib/ext
14:32:07,000 INFO  [root]   System property [sun.boot.class.path] = D:\geronimo-tomcat6-jee5-2.0\lib\endorsed\xercesImpl-2.8.1.jar; ...
14:32:07,000 INFO  [root] ----------------------------------------------
Starting Geronimo Application Server v2.0
[****************************] 100%  19s Startup complete
  Listening on Ports:
    1099 0.0.0.0 RMI Naming
    1527 0.0.0.0 Derby Connector
    4201 0.0.0.0 ActiveIO Connector EJB
    4242 0.0.0.0 Remote Login Listener
    8009 0.0.0.0 Tomcat Connector AJP
    8080 0.0.0.0 Tomcat Connector HTTP
    8443 0.0.0.0 Tomcat Connector 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/webconsole-tomcat/2.0/car
    RAR: org.apache.geronimo.configs/activemq/2.0/car
    RAR: org.apache.geronimo.configs/system-database/2.0/car
    WAR: org.apache.geronimo.configs/dojo-tomcat/2.0/car
    WAR: org.apache.geronimo.configs/remote-deploy-tomcat/2.0/car
    WAR: org.apache.geronimo.configs/welcome-tomcat/2.0/car

  Web Applications:
    http://localhost:8080/
    http://localhost:8080/console
    http://localhost:8080/console-standard
    http://localhost:8080/dojo
    http://localhost:8080/remote-deploy

Geronimo Application Server started

Note that some lines from the previous screenshot have been truncated for displaying purposes, instead this lines ended with "...".

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 deployed in the standard, full J2EE certified distribution.

http://localhost:8080/console

When prompted enter system as the user name and manager as the password.

The following figure illustrates the Web based console.

At this point 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 deploy and run that sample application.

Create and deploy a sample application

A HelloWorld like JSP is almost a default for these basic testing and everybody is already familiar with it. Create a new directory to hold all the application related files. From now on this directory will be referred as <app_home>.

Create a plain text file in the <app_home> directory named HelloWorld.jsp and copy the content of the following example.

HelloWorld.jsp
<html>
  <head>
   <jsp:useBean id="datetime" class="java.util.Date"/>
    <title>
        Basic HelloWorld JSP
     </title>
 </head>
  <body bgcolor="#909DB8">
     <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 create a Geronimo specific deployment plan so you would get a first glimpse of the deployment plans. Create a directory named WEB-INF inside the <app_home> directory.

Create a plain text file in the <app_home>/WEB-INF directory named geronimo-web.xml and copy the content of the following example.

Geronimo deployment plan geronimo-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2">
    <environment>
        <moduleId>
            <groupId>sample.applications</groupId>
            <artifactId>HelloWorldApp</artifactId>
            <version>2.0</version>
            <type>war</type>
        </moduleId>             
    </environment>
    <context-root>/hello</context-root>
</web-app>

Create a plain text file in the <app_home>/WEB-INF directory named web.xml and copy the content of the following example.

web.xml
<?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>

For your convenience, you can download the HelloWorld (HelloWorld_2.0.zip or HelloWorld_2.0.war) sample application provided with this article.

Deploy and test the application

For this example we will not invest time in packaging the application, we will just use the --inPlace feature of the deployer tool which allows us to deploy an application from any directory.

Change directory to <geronimo_home>/bin and run the following command:

deploy --user system --password manager deploy --inPlace <app_home>

Once the application is successfully deployed you should see the following message:

d:\geronimo-tomcat6-jee5-2.0\bin>deploy --user system --password manager deploy --inPlace \HelloWorld_2.0
Using GERONIMO_BASE:   D:\geronimo-tomcat6-jee5-2.0
Using GERONIMO_HOME:   D:\geronimo-tomcat6-jee5-2.0
Using GERONIMO_TMPDIR: D:\geronimo-tomcat6-jee5-2.0\var\temp
Using JRE_HOME:        C:\Java\jdk1.5.0_06\\jre
    Deployed sample.applications/HelloWorldApp/2.0/war @
    http://hcunico:8080/hello

Test the application by pointing a Web browser to the following URL:

http://localhost:8080/hello

Summary

This article showed you how simple is to have Apache Geronimo up and running. The overall time for getting the server running should be less than five minutes if you have the prerequisites already installed. Additionally, this article also showed you how to create, deploy and test a very simple JSP in less than five minutes.