Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

A Geronimo Server can also be defined while creating a Geronimo Server Runtime by checking the option Also create new local server. This will present an additional dialog to configure the hostname, ports, etc.

Creating a new project

To create a new Web project, follow the steps below:

Once Geronimo Server Runtimes are defined, Eclipse provides these runtime for selecting as a target runtime while creating an EJB, Web and Java EE projects. Notice the Target Runtime field in the Dynamic Web Project dialog shown in the figure below.

Image Added

Upon adding the Geronimo 2.1 Server Runtime as the target runtime, the Geronimo server libraries and Java EE specification libraries get automatically added to the build path of the project. GEP will also create Geronimo specific deployment plans.

In order to run an application on Geronimo, follow the steps below:

  1. Right-click on the project
  2. Click File, New, Project to launch the New Project dialog.
  3. Select Dynamic Web Project and click Next.
    Image Removed
    Enter mywebapp for project name, select Apache Geronimo v2.1 Runtime for Target Runtime, select Default Configuration for Apache Geronimo v2.1 Runtime and click Finish.
    Image Removed
  4. In the Project Explorer view, Right click on mywebapp and select New, JSP.
  5. Enter index.jsp for File name and click Finish.
  6. Change the content of index.jsp to the following: Code BlockhtmlhtmlborderStylesolidtitleindex.jsp
    
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>My WebApp</title>
    </head>
    <body>
    <h1>Welcome to My WebApp</h1>
    </body>
    </html>
    
    Right-click on mywebapp and select Run As, Run on Server.
  7. Click Choose and existing server, select Apache Geronimo v2.1 Server at localhost and click Finish.

The application will can also be run on the selected server and the welcome page will display in a web browser window inside eclipse.

...

Geronimo by adding the project to the Geronimo server explicitly as given below:

  1. In the Servers view, Right-click on Apache Geronimo v2.1 Server at localhost and select Add and Remove Projects.
  2. In the Add and Remove Projects dialog, select the project under Available projects and click on Add button. The project will now be listed under Configured projects.
  3. Click Finish.
  4. If the server status is shown as Republish, right-click on the server and select Publish.

Configuring your development environment

In this section we discuss various options to configure your development environment.

Editing a Server configuration

In order to edit the configuration of a server, double click on server in the Servers view to open the overview of the server as shown below.



  • General Information
    Edit the fields in this section to change the name of the server or to associate the Geronimo Server with a different Apache Geronimo v2.1 Runtime or to change the hostname with which the Geronimo Server is associated.
  • Security Credentials
    The default User ID is system with a password manager. If your server installation uses a different set of credentials, change these accordingly. These security credentials configured here are used to detect server status as well as deploying and undeploying of applications.
  • Automatic Publishing
    All servers use the default publishing settings. The server can be configured to not publish automatically by selecting the Never publish automatically option. The default publish setting can be overridden by selecting the Override default settings option and providing a new Publish interval.
  • Port Configuration
    The default HTTP and RMI ports are 8080 and 1099 respectively. If your server installation uses a different HTTP and/or RMI port, edit these values accordingly. Altering the values here does not change the corresponding ports in the associated Geronimo Server Runtime.
  • Console Output
    The default server console output log level is INFO. If you want to enable debug output to console, select DEBUG.
  • Server Startup
    The settings under this section control the ping thread that polls to the server to detect the server while status when the server is starting up. (Need to figure the exact use of these setting)started from within eclipse. Ping delay specifies the time the ping thread will wait before polling the server. Ping interval controls the time between successive pings. Maximum Pings is the number of times the ping thread will poll the server to detect a successful startup. If the server startup can not be confirmed, the ping thread will stop the server.
    In case of a remote server, Ping interval controls the time between successive pings to update the server status.
  • Server VM Arguments
    Any additional arguments to be passed on to the server VM can be specified here.

Other configuration

Children Display