GlassFish integration with NetBeans, Eclipse and JDeveloper


This is how GlassFish integrates with NetBeans, Eclipse and JDeveloper.

NetBeans

NetBeans 6.1 provides out-of-the box integration as it is bundled with GlassFish.

Just keep the default setting “GlassFish V2 UR2” enabled during installation process.

In this way GlassFish is automatically installed, configured and ready-to-use: simply press “Run” on any web project!

However, if you would like to declare another installation of GlassFish go to Tools → Servers → Add Server…

Select the proper version, specify the name and click “Next.

Provide the installation path of GlassFish through the “Browse” button and click “Next” to configure the password or “Finish” to complete.

That’s it!

Let’s create a simple web application to test it. Go to File → New Project… → Web → Web Application → Next → Specify the Project Name → Finish

The project should appear on the Projects tab. Edit the code of index.jsp and change <h2>Hello World!</h2> to <h2>Hello World from GlassFish!</h2>

Now simply right-click on the project and select “Run”!

Eclipse

If you are behind a proxy make sure you have properly configured the network settings for HTTPs also. Window → Preferences → General → Network Connections and make sure the option “Use this proxy server for SSL” is checked → Apply → OK → restart Eclipse.

Open the Servers view: Window → Show View → Other… → Server → Servers

On the Servers tab right-click → New → Server

Click on the “Download additional server adapters” link.

Click on the GlassFish Java EE Server option and press “Next”.

Afte reading and accepting the CDDL licence press “Finish” and OK at the prompt message. After a while Eclipse will restart.

Now go the Servers tab right-click → New → Server and select “GlassFish”.

Note: The plugin for brand new GlassFish v3 Technology Preview 2 is already available!

Select the version of GlassFish you have installed and press “Next”.

Provide the installation directory of GlassFish and click “Next”.

That’s it!

JDeveloper

JDeveloper has a really handy feature: deploy-on-demand.

Let’s assume we want to deploy a web application. In the Application Navigator right-click on the project → New… → General → Deployment Profiles

Select war and click “Next”.

After specifying the name, for example “wicket”, provide the hot-deploy directory of GlassFish through the “Browse” button.

That’s it!

To deploy the application simply right-click on the project → Deploy → wicket → to WAR file.

3 Responses to GlassFish integration with NetBeans, Eclipse and JDeveloper

  1. […] the application to your favorite server, for example JBoss, GlassFish or the bundled Weblogic, to see it in […]

  2. hi
    I did not find GlassFish web server in the list of web server in Jdeveloper ! how can I add this web server to the list for future use

    thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: