geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v2.2 > How to Use Geronimo Eclipse Plugin
Date Wed, 03 Feb 2010 08:15:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=GMOxDOC22&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/GMOxDOC22/How+to+Use+Geronimo+Eclipse+Plugin">How
to Use Geronimo Eclipse Plugin</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~carol%2Bh">Di
Hu</a>
    </h4>
     Replaced all occurrences of Apache Geronimo v2.1.x with Apache Geronimo v2.2 
          <div id="versionComment" class="noteMacro" style="display:none; padding: 5px;">
     Replaced all occurrences of Apache Geronimo v2.1.x with Apache Geronimo v2.2 <br />
     </div>
          <br/>
     <div class="notificationGreySide">
         <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
class='ScrollbarPrevIcon'><a href="/confluence/display/GMOxDOC22/How+to+open+a+bug+for+Geronimo+Eclipse+Plugin"><img
border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td
width='33%' class='ScrollbarPrevName'><a href="/confluence/display/GMOxDOC22/How+to+open+a+bug+for+Geronimo+Eclipse+Plugin">How
to open a bug for Geronimo Eclipse Plugin</a>&nbsp;</td><td width='33%'
class='ScrollbarParent'><sup><a href="/confluence/display/GMOxDOC22/Apache+Geronimo+Development+Tools+Project"><img
border='0' align='middle' src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/GMOxDOC22/Apache+Geronimo+Development+Tools+Project">Apache Geronimo
Development Tools Project</a></td><td width='33%' class='ScrollbarNextName'>&nbsp;<a
href="/confluence/display/GMOxDOC22/PLUGIN_RELEASE-NOTES-2.2.0.txt">PLUGIN_RELEASE-NOTES-2.2.0.txt</a></td><td
class='ScrollbarNextIcon'><a href="/confluence/display/GMOxDOC22/PLUGIN_RELEASE-NOTES-2.2.0.txt"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>

<p><img class="emoticon" src="/confluence/images/icons/emoticons/star_yellow.gif"
height="16" width="16" align="absmiddle" alt="" border="0"/> A video desktop demonstration
of <a href="http://cwiki.apache.org/confluence/display/GMOxDOC22/How+to+Use+the+Apache+Geronimo+Eclipse+Plugin+(video)"
rel="nofollow">How to Use the Apache Geronimo Eclipse Plugin</a> is available.</p>

<p>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.</p>
<div>
<ul>
    <li><a href='#HowtoUseGeronimoEclipsePlugin-AddingTargetServerandJavaRuntimeinEclipse'>Adding
Target Server and Java Runtime in Eclipse</a></li>
    <li><a href='#HowtoUseGeronimoEclipsePlugin-StartandStopServer'>Start and
Stop Server</a></li>
    <li><a href='#HowtoUseGeronimoEclipsePlugin-DeployRunUndeployandRedeployanApplication'>Deploy
Run Undeploy and Redeploy an Application</a></li>
    <li><a href='#HowtoUseGeronimoEclipsePlugin-LaunchingGeronimoConsoleandSupport'>Launching
Geronimo Console and Support</a></li>
    <li><a href='#HowtoUseGeronimoEclipsePlugin-Otherfunction'>Other function</a></li>
</ul></div>

<h1><a name="HowtoUseGeronimoEclipsePlugin-AddingTargetServerandJavaRuntimeinEclipse"></a>Adding
Target Server and Java Runtime in Eclipse</h1>

<ol>
	<li>Launch Eclipse. By default JEE perspective will be launched. Select <b>Server</b>
tab. Right Click and Select <b>New-&gt;Server</b>.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure1.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>On the next screen select <b>Apache-&gt;Apache Geronimo V2.2 Server</b>.
In case you do not see geronimo in the list follow the steps mentioned in <a href="/confluence/display/GMOxDOC22/How+to+install+Geronimo+Eclipse+Plugin+v2.1.2"
title="How to install Geronimo Eclipse Plugin v2.1.2">How to install Geronimo Eclipse Plugin
v2.2</a>.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure2.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>On the next screen select Installed JRE's to install a new Java Runtime Environment.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure3.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>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 <b>Add</b>.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure4.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>On the <b>Add JRE</b> window select <b>Standard VM</b>.
Select <b>Next</b>.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure5.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>On the next window Browse to your root directory of Installed JRE.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure6.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>Once done you can see <b>JRE home</b> and <b>JRE name</b>
field populated. Select <b>Finish</b>.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure7.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>Check the box to select newly added JRE. Select <b>Ok</b>.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure8.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>On the New Server window select the drop down box and select the newly added JRE.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure9.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" />
However for the current illustration we will stick to Java 6.</li>
	<li>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.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure10.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>Select Next once you have specified all the artifacts.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure11.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>Keep the default values for next 2 windows and select Next. Select Finish. This
will create a geronimo server under <b>Server</b> tab.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure12.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" />
This completes the ilustration for adding a server</li>
</ol>


<h1><a name="HowtoUseGeronimoEclipsePlugin-StartandStopServer"></a>Start
and Stop Server</h1>

<ol>
	<li>Right Click on the geronimo server instance and Select <b>Start</b>.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure13.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>Server will be started and you can see the status changed to Started.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure14.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>To stop the server Right Click on the server instance and Select <b>Stop</b>.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure15.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" />
<h1><a name="HowtoUseGeronimoEclipsePlugin-DeployRunUndeployandRedeployanApplication"></a>Deploy
Run Undeploy and Redeploy an Application</h1></li>
</ol>


<p>To illustrate these functionalities we will add a simple web project and later work
with it to deploy/run/undeploy/redploy application.</p>
<ol>
	<li>Right Click under Project Explorer and Select <b>New-&gt;Dynamic Web
Project</b>.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure16.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>Name the project as <b>Hello World</b>. Select <b>Next</b>.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure17.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>Keep the defaults on the next window. Select <b>Next</b>.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure18.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>On the Geronimo Deployment Plan window name the <b>Artifact Id</b>
as Hello. Select <b>Finish</b>. This will add a web project.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure19.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>Expand the project and Right Click on <b>Web Content</b>. Select <b>New-&gt;JSP</b>.
Name the jsp as index.jsp and Select <b>Next</b>.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure20.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>On the next window select Finish.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure21.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>In index.jsp add the title as <b>Hello World</b> and in the body add
<b>This is my first application on G/GEP</b>. Save the changes.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure22.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>Now you are all set to run your first application on Geronimo. Right Click on your
project and select <b>Run-&gt;Run on Server</b>.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure23.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>On the next screen select Apache Geronimo and Select <b>Next</b>.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure24.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>You can see Hello World as one of the configured projects. Select <b>Finish</b>.
This will <b>DEPLOY</b> your application on Geronimo server.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure25.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>Launch a web browser as shown in the figure.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure26.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>Run the url <a href="http://localhost:8080/Hello" rel="nofollow">http://localhost:8080/Hello</a>
World. This sill <b>RUN</b> your application.<br/>
<img src="/confluence/download/attachments/97791/figure27.png" align="absmiddle" border="0"
/><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>Next modify index.jsp and append <b>Hello World&#33;</b> in the
body.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure28.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>Once you save the changes you can see Geronimo server state changing to <b>Republish</b>.
It may take a moment till your application is <b>REDEPLOYED</b>.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure29.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>Refresh the browser to verify if the changes you made are reflected.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure30.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>To <b>UNDEPLOY</b> the application from server. Right Click on geronimo
server instance and select <b>Add and Remove Projects</b>.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure31.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>On the next screen select <b>Hello World</b> project and select <b>Finish</b>.
This will <b>UNDEPLOY</b> the project from geronimo.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure32.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
</ol>


<h1><a name="HowtoUseGeronimoEclipsePlugin-LaunchingGeronimoConsoleandSupport"></a>Launching
Geronimo Console and Support</h1>

<p>You can also launch Geronimo Console from Eclipse.</p>
<ol>
	<li>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.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure33.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>Right click on geronimo server instance and Select Launch Geronimo Console to launch
geronimo administrative console.<br/>
<img src="/confluence/download/attachments/97791/figure34.png" align="absmiddle" border="0"
/><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
	<li>Similarly select Geronimo Support. This will launch Apache Geronimo website.</li>
</ol>


<h1><a name="HowtoUseGeronimoEclipsePlugin-Otherfunction"></a>Other function</h1>

<ol>
	<li>Double click on geronimo server instance. This will launch the settings for your
added geronimo server instance.
<br clear="all" />
<br clear="all" />
<br clear="all" /> <img src="/confluence/download/attachments/97791/figure35.png"
align="absmiddle" border="0" /><br clear="all" />
<br clear="all" />
<br clear="all" /></li>
</ol>


<p>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</p>
<ol>
	<li><a href="/confluence/display/GMOxDOC22/Tutorials" title="Tutorials">Tutorials</a>.
These tutorials illustrate step by step development of applications based on all the Java
EE5 API's.</li>
</ol>

     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/GMOxDOC22/How+to+Use+Geronimo+Eclipse+Plugin">View
Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=97791&revisedVersion=6&originalVersion=5">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/GMOxDOC22/How+to+Use+Geronimo+Eclipse+Plugin?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message