Learn how to deploy the Java™ Server page (JSP), servlet, and different Enterprise JavaBean (EJB) on Apache Geronimo. This article contains the deployment steps required by Apache Geronimo, which is not quite the same as other Java 2 Platform Enterprise Edition (EE) containers.
Learn the steps to deploy a simple Java EE application on a computer running Apache Geronimo to see how these steps are similar to other application servers that conform to the Java EE specification. While this article focuses on how to deploy EJBS on Apache Geronimo, it also learns about JSP and servlet content. This article assumes that readers know how to write and deploy EJBS on other Java-EE containers, such as IBM websphere® application servers, JBoss, or WebLogic.
Note: Please use the current release of Apache Geronimo (which is version 1.0 M5) to process the code examples in this article when you write this article.
Java EE deployment process
Apache Maven is used to build and deploy all the sample code in this article. So, there are a lot of files that are specific to Maven build scripts. The output is the Enterprise file (EAR) document. After the. ear file is built, you must run the following command to deploy it on Apache Geronimo:
$ Java-jar Bin/deployer.jar Deploy Phonebook.ear
I want to thank Neal Sanche for allowing me to use the code in his article, "Using Geronimo into an EJB Web application" (developerworks,2005 year July) as the basis for interpreting the deployment process. As you read this article, download the code and refer to it (see the Download section).
JSP and Servlet
JSP and servlet are two basic Java technologies that drive the user interface (UI) layer of the Java EE application. JSP is primarily used to represent logic and HTML code. The Servlet forms the controller layer of a typical model-view-controller (MVC) architecture and serves as an interface between the presentation layer and the model layer.
The simple application in the sample code is written in Apache Struts. The code contains a small number of Struts action classes and two JSP pages. Figure 1 shows the structure of the source code.
Figure 1. Source code structure for the sample