Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{scrollbar}

JavaServer Faces technology provides

...

The entire application can be downloaded from this link.

Setting the Eclipse environment

1. Download Apache Geronimo2.1 and install it on the server. Look into the geronimo documentation for instructions.

...

3. Create a runtime environment for Apache Geronimo2.1 in the eclipse. Look into the geronimo eclipse plugin documentation for instructions to install a runtime for Apache Geronimo2.1.

Creating WEB application with entities

1. Start the eclipse wizard and right click on the Project Explorer and click on the New => Dynamic Web Project

...

35. This finishes the WEB application creation and JSF configuration. Export the EmployeeWEB to a EmployeeWEB.war file.

Setting up the database tables and the Datasource

1. Start the geronimo server and click on the Console Navigation => Embedded DB => DB manager. Enter EmployeeDB in the Create DB textbox as shown in the below screen shot and click on the Create button.

...

6. This will deploy the EmployeeDS database pool. The moduleId of the database pool is console.dbpool/EmployeeDS/1.0/rar which is declared as a dependency in the geronimo-web.xml. This is because, JPA uses this database source to persist entities.

Deploying the (war) application

1. Deploy the EmployeeWEB.war file using the command prompt as follows.

No Format
bgColor#000000
borderStylesolid
C:\Geronimo-2.1\bin>deploy.bat --user system --password manager deploy EmployeeWEB.war
Using GERONIMO_BASE:   C:\Geronimo-2.1
Using GERONIMO_HOME:   C:\Geronimo-2.1
Using GERONIMO_TMPDIR: var\temp
Using JRE_HOME:        C:\SDK-May-31-2007\jre
    Deployed EmployeeJSF/WEB/1.0/car @ /EmployeeWEB

Running the application

1. Open a browser window and hit the URL http://localhost:8080/EmployeeWEB/. This will bring up the below screen.

...