Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

You should now have the following project structure.


Note
titleImportant

Remove When workng on versions pervious to Geronimo 2.1.7, remove ejbModule/META-INF/openejb-jar.xml file in the SampleEJB project as it causes deployment issues. See the file highlighted in the image above. However, when using Geronimo 2.1.7, you must include this ejbModule/META-INF/openejb-jar.xml file or else you will encounter NullPointerException error due to a bug issue.

Create Dynamic Web Project

...

  1. Right-click on the SampleWAR project and select Properties. Go to J2EE Module Dependencies and select the checkbox next to SampleEJB.jar (it's in the J2EE Modules tab) and click OK.
    Image Removed
    Image Added

  2. Right-click on the SampleWAR project and select New -> Servlet and fill it in with the following values:
    Section
    • Java Package: sampleear
    • Class name: MyServlet




  3. Click Next.
  4. Change the URL Mapping section so the servlet serves at /sayHello url mapping and click Finish.


...

  1. Right-click on the SampleEAR project and select Run As -> Run on Server. When Run On Server popup window comes up, select the Always use this server when running this project checkbox. Leave the rest as is.



  2. Click Finish.
  3. The server's stopped so nothing happens (from a user's perspective at least). Open up the Servers tab and right-click on Apache Geronimo v2.1 Server at localhost and select Start.
  4. After a few seconds, Geronimo will be up and running with the enterprise application published. Open up the browser of your choice and go to http://localhost:8080/SampleWARImage Removed.
    !welcome.jsp!
    Image Added

  5. Type in any name you want, e.g. John Doe and press Press me! button.