Skip to main content

GlassFish on Eclipse Ganymede

Posted by arungupta on June 27, 2008 at 6:13 AM PDT
cellspacing="5">
style="text-decoration: underline;"> style="width: 182px; height: 117px;" alt=""
src="http://blogs.sun.com/arungupta/resource/images/ganymede-logo.png">
Eclipse
Ganymede
is the annual release of Eclipse projects; this year
including 23 projects. href="http://blogs.sun.com/arungupta/entry/screencast_ws6_eclipse_europa_and">Screencast
#WS6 showed how GlassFish v2 can be easily registered and
started within an earlier version of Eclipse (3.3 specifically).



Eclipse is now 3.4 (as part of Ganymede) and href="http://glassfish.org/v3">GlassFish v3 is
blazing the community with it's modular, embeddable and extensible
architecture.



This blog shows how GlassFish v3 can be easily registered and started
in Ganymede. Let's get started!



Download Ganymede
and GlassFish
v3 TP2
or href="http://blogs.sun.com/arungupta/entry/totd_33_building_glassfish_v3">build
the latest workspace. Check Eclipse version by
selecting "Eclipse", "About Eclipse platform" menu item. The window
shows:



src="http://blogs.sun.com/arungupta/resource/images/ganymede-about.png">



Now follows the screenshots as described in href="http://blogs.sun.com/arungupta/entry/screencast_ws6_eclipse_europa_and">screencast
#ws6 but this time for Ganymede instead of Eclipse Europa:



Create a new server ...



src="http://blogs.sun.com/arungupta/resource/images/ganymede-new-server.png">



... and the window shows the list of default servers ...



src="http://blogs.sun.com/arungupta/resource/images/ganymede-new-server-dialog.png">



... click on "Download additional server adapters" to see GlassFish in
the list ...



src="http://blogs.sun.com/arungupta/resource/images/ganymede-install-new-adapter.png">



... select "GlassFish Java EE 5 Server" and click on "Next >" ...



src="http://blogs.sun.com/arungupta/resource/images/ganymede-new-adapter-confirmation.png">



... accept the license and take all other defaults. The IDE needs to be
restarted and then again you add a new server ...



src="http://blogs.sun.com/arungupta/resource/images/ganymede-v3-snapshot.png">



... and this time choose "GlassFish V3 SNAPSHOT" ...



src="http://blogs.sun.com/arungupta/resource/images/ganymede-glassfish-location.png">



and specify the location of downloaded/built GlassFish v3 server. Now
create a new project ...



src="http://blogs.sun.com/arungupta/resource/images/ganymede-new-project.png">



... give it a name ...



src="http://blogs.sun.com/arungupta/resource/images/ganymede-new-project-name.png">



... and ensure the "Target Runtime" is "GlassFish V3 SNAPSHOT". And the
default project structure is shown below ...



src="http://blogs.sun.com/arungupta/resource/images/ganymede-default-project-layout.png">



... and now add a JSP ...



src="http://blogs.sun.com/arungupta/resource/images/ganymede-new-jsp.png">



... and give it a name ...



src="http://blogs.sun.com/arungupta/resource/images/ganymede-new-jsp-name.png">



... and then select a template ...



src="http://blogs.sun.com/arungupta/resource/images/ganymede-new-jsp-template.png">



... and add some content to it ...



href="http://blogs.sun.com/arungupta/resource/images/ganymede-new-jsp-add-content.png"> style="border: 0px solid ; width: 800px; height: 479px;" alt=""
src="http://blogs.sun.com/arungupta/resource/images/ganymede-new-jsp-add-content.png">



... and then deploy on GlassFish by selecting "Run As", "Run on Server"
...



src="http://blogs.sun.com/arungupta/resource/images/ganymede-jsp-run-as.png">



... and selecting "GlassFish V3 SNAPSHOT" as the server ...



src="http://blogs.sun.com/arungupta/resource/images/ganymede-jsp-run-as-on-glassfish.png">



and click on "Finish" to see the result ...



src="http://blogs.sun.com/arungupta/resource/images/ganymede-jsp-output.png">



and that's it!



As a next step, you can try installing href="http://weblogs.java.net/blog/bhaktimehta/archive/2008/05/working_with_me.html">Metro
on TP2 and then deploy your Web service using Eclipse. If you
face any problems then send email to href="mailto:users@glassfish.dev.java.net">users@GF
or post a question to href="http://forums.java.net/jive/forum.jspa?forumID=56&start=0">GlassFish
Forum.



And if you are interested in a tighter integration of GlassFish v3 with
an IDE  - NetBeans
provides that solution as shown in href="http://blogs.sun.com/arungupta/entry/screencast_24_getting_started_with">screencast
#24.



Technorati: eclipse
ganymede
glassfish
v3

Related Topics >>

Comments

YEAH :) finally, all that problems I got trying to run my J2EE projects on Eclipse was caused by the bugged plugin... now my web.xml 2.5 is running fine...

macgibbon, There should be no need to configure any additional plugins. Although I tried on Windows Vista & Mac OS.

Hmm, I am getting "org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP" error with GlassFish V3 TP2 with Windows XP. I have get the same error with either JDK 1.5.09 or JDK 1.6.0. Is there something I need to configure for the compiler, have tried adding tools.jar to the classpath.