ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

What Is Geronimo?
Pages: 1, 2, 3

Deploy the App

Here, we'll use Geronimo's deployer to deploy the .war file. Geronimo provides a deploy command for this purpose. You must provide an administration login (system/manager) on the command line while deploying. If not explicitly specified, the deployer will ask you for it. The following command deploys the .war file:


D:\geronimo-1.0>java -jar bin/deployer.jar --user
system --password manager deploy
    Deployed com/onjava/safari/myApp @

The deployer is smart enough to figure out the kind of component being deployed; we just give it our .war file and the deployer will deploy the file as a Web application. The deployer.jar deploys the application module based on the information provided in the deployment plan (geronimo-web.xml) to the Geronimo server.

Alternatively, you can manually deploy the .war file using Geronimo's console window (as shown in Figure 2). Select the Deploy New link from the Console Navigation panel on the left, browse to the WAR file, and then click the Install button.

Deploy new web app in Geronimo
Figure 2. Deploy new web app in Geronimo

Once deployed, the web app will appear under the "Installed Web Applications" listing in Geronimo's console window as shown below in Figure 3.

Installed Web Applications
Figure 3. Installed Web Applications

Test the App

All that said, let's cheerily run through it. Start up a browser and try the URL http://localhost:8080/myApp/hello.jsp. The Tomcat web container processes and executes the JSP as shown in Figure 4 below:

Test JSP running on Geronimo app server
Figure 4. Test JSP running on Geronimo app server


Geronimo is modular by nature. This allows easy plugging of modules such as Apache Derby, which ships with Geronimo. Integration of frameworks like Spring is seamless. So, what's holding you up? It's time to give Geronimo a spin.


Kunal Jaggi is an independent Java consultant, primarily focused on enterprise solutions with Java-based technologies.

Return to ONJava.com.