Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Here we will illustrate the various useful functionalities of GEP. This will include adding server runtime, adding Java runtime, start, stop, deploy, redeploy, undeploy and other functionalities.

Adding Target Server and Java Runtime in Eclipse

  1. Launch Eclipse. By default JEE perspective will be launched. Select Server tab. Right Click and Select New->Server.


    Image Added


  2. On the next screen select Apache->Apache Geronimo V2.1 Server. In case you do not see geronimo in the list follow the steps mentioned in How to install Geronimo Eclipse Plugin v2.1.2.


    Image Added


  3. On the next screen select Installed JRE's to install a new Java Runtime Environment.


    Image Added


  4. This will launch the installed JRE's window where all the installed JRE's can be seen. You can currently see only one installed JRE. Select Add.


    Image Added


  5. On the Add JRE window select Standard VM. Select Next.


    Image Added


  6. On the next window Browse to your root directory of Installed JRE.


    Image Added


  7. Once done you can see JRE home and JRE name field populated. Select Finish.


    Image Added


  8. Check the box to select newly added JRE. Select Ok.


    Image Added


  9. On the New Server window select the drop down box and select the newly added JRE.


    Image Added


    However for the current illustration we will stick to Java 6.
  10. Next Browse to the root folder of your Geronimo Server Installation. In case you do not have a server installed select the link as shown in the figure to download geornimo.


    Image Added


  11. Select Next once you have specified all the artifacts.


    Image Added


  12. Keep the default values for next 2 windows and select Next. Select Finish. This will create a geronimo server under Server tab.


    Image Added


    This completes the ilustration for adding a server

Start and Stop Server

  1. Right Click on the geronimo server instance and Select Start.


    Image Added


  2. Server will be started and you can see the status changed to Started.


    Image Added


  3. To stop the server Right Click on the server instance and Select Stop.


    Image Added


    Deploy Run Undeploy and Redeploy an Application

    To illustrate these functionalities we will add a simple web project and later work with it to deploy/run/undeploy/redploy application.
  4. Right Click under Project Explorer and Select New->Dynamic Web Project.


    Image Added


  5. Name the project as Hello World. Select Next.

...




  1. Image Added


  2. Keep the defaults on the next window. Select Next.


    Image Added


  3. On the Geronimo Deployment Plan window name the Artifact Id as Hello. Select Finish. This will add a web project.


    Image Added


  4. Expand the project and Right Click on Web Content. Select New->JSP. Name the jsp as index.jsp and Select Next.


    Image Added


  5. On the next window select Finish.


    Image Added


  6. In index.jsp add the title as Hello World and in the body add This is my first application on G/GEP. Save the changes.


    Image Added


  7. Now you are all set to run your first application on Geronimo. Right Click on your project and select Run->Run on Server.


    Image Added


  8. On the next screen select Apache Geronimo and Select Next.


    Image Added


  9. You can see Hello World as one of the configured projects. Select Finish. This will DEPLOY your application on Geronimo server.


    Image Added


  10. Launch a web browser as shown in the figure.


    Image Added


  11. Run the url http://localhost:8080/Hello World. This sill RUN your application.
    Image Added


  12. Next modify index.jsp and append Hello World! in the body.


    Image Added


  13. Once you save the changes you can see Geronimo server state changing to Republish. It may take a moment till your application is REDEPLOYED.


    Image Added


  14. Refresh the browser to verify if the changes you made are reflected.


    Image Added


  15. To UNDEPLOY the application from server. Right Click on geronimo server instance and select Add and Remove Projects.


    Image Added


  16. On the next screen select Hello World project and select Finish. This will UNDEPLOY the project from geronimo.


    Image Added


Launching Geronimo Console and Support

You can also launch Geronimo Console from Eclipse.

  1. Select your preferences to launch the geronimo console as suggested in the figure. Accordingly geronimo administrative console will be launched in Eclipse Internal browser or an external browser.


    Image Added


  2. Right click on geronimo server instance and Select Launch Geronimo Console to launch geronimo administrative console.
    Image Added


  3. Similarly select Geronimo Support. This will launch Apache Geronimo website.

Other function

  1. Double click on geronimo server instance. This will launch the settings for your added geronimo server instance.


    Image Added


Where to go from here??? There are good number of tutorials through which you can play more with Eclipse and GEP. Check out the following

  1. tutorials. These tutorials illustrate step by step development of applications based on all the Java EE5 API's.