Skip to main content

Eclipse 3.4 and GlassFish Java EE 5 integration

Download the Eclipse IDE for Java EE Developers (as of August 2008, Ganymede - Windows 162Mb (tools for Java Developers creating JEE and Web applications, including a Java IDE, tools for JEE and JSF, Mylyn and others...:

Install the IDE and start it, close the "Welcome" page, Then:

If you're behind a firewall, make sure you have set an SSL proxy: Bring up Preferences, then expand General, Network Connections and fill in the values for your SSL proxy. If you don't have a SSL proxy but a you have a plain http proxy, be sure to check the checkbox Use this proxy server for SSL 1
Now, switch to the "Java EE" perspective. For example: 1
Now, In the Server Tab, use the popup menu to call the "New Server" wizard: 1
Click on the link "Download additional server adapters". 1

Select the GlassFish Java EE 5 Server entry 1
Accept the license to download the GlassFish adapter 1
Eclipse will now download the adater from the GlassFish update Center. Click the OK button to continue. 1
After the download, Eclipse will prompt for a restart. Click the Yes button to continue: 1
After a fresh restart, you'll see the GlassFish category in the "New Server" wizard: 1
Select a version of GlassFish you want to work with, for example GlassFish V2: 1
Using the "Browse..." buttton, navigate to a correct GlassFish installation directory. IF you have not installed GlassFish, get it from
In the Next step of the wizard, you can fine tune some server properties. Default values are usually correct, but adapt them to your environment: 1
A new Server (GlassFish V2) is now added to the Servers tab. Using the popup meny, you can start it: 1
Once started, the server status will be shown as "Started". 1
Using the Console Tab, you can see the server log content: 1
Now it is time to create a Java EE 5 Web Application: on the PRoject Explorer view, if you are using the Java EE perspective, you can use the Popup menu New->Dynamic Web Project: 1
Enter a name and verify that the Target runtime is GlassFish V2 Java EE 5 1
In the Next step, you can verify the that version for Web Application is Servelt 2.5 (java EE 5 compliant), and if you want a default sun-web.xml deployment descriptor, make sure this facet is selected (on by default): 1
You see the new Web Application on the Project explorer.  Just create a new JSP index,jsp (Eclipse does not create it by default): 1
Using the green run button on the Eclipse Tool bar, you are presented with the following choices. Pick the "Run on Server" item: 1
Click the Finish button on the "Run On Server" wizard: 1
The Web Application is deployed to GlassFish and the index.jsp page is shown in the internal broswer in Eclipse. You can see the deployment status in the Eclipse Console 1
If you need to debug, you could also "DEbug" this Web Application 1
And the GlassFish V2 server will restart in debug mode, and Eclipse will attach to the debugged server.
If you set a breakpoint on a JSP, the server will be stopped and you can use all the Debugger features from Eclipse to debug your Java EE application:

Please Confirm