| New to GlassFish  | Downloads| FAQ |Resources | GlassFish Project Home | How-Tos

Getting Started Guide

Most GlassFish users are application developers who are primarily interested in using it as a binary as opposed to work with its source-code. This guide is intended to get Java EE developers up and running by providing an example application and instructions about deploying and running on GlassFish.

Here are some simple steps for deploying applications on GlassFish.  The application chosen is a sample of the new features in the Serlvet spec.  GlassFish is an implementation of the Java EE 5 specifications and has implemented the features in JSR 154 today.   You can also deploy your favorite J2EE 1.4 based application as Java EE is backward compatible.  Let us know how your application runs on GlassFish and if you run into problems.

Download and configure GlassFish

We recommend that you use a promoted build since those have passed at a set of Quicklook, CTS and functional tests.  Follow the instructions on the download page to install and configure the server.  To start the server on the command line type
  <glassfish-install>/bin/asadmin start-domain

The default administration values are as follows:


Download  examples 

 For your convience the servlet examples are provided as a war file.  If you would like to build them yourself you can find the code in the GlassFish workspace.  Simply build the servlet-api module and the examples will be built also.  These examples were selected because they demonstrate the latest features in JSR 154, Servlet Specification.  There is a pointer to the source code which is available in the GlassFish repository and the jakarta project on Apache.

Save the servlet example war file to your disk.

Deploy the example application 

For now the easiest way to deploy on GlassFish is to use the autodeploy feature.  We are working on plugins for both NetBeans and Eclipse.

You can simply copy the war file in the following directory <glassfish-install>/domains/domain1/autodeploy and the
server will automatically deploy the application.  There is no need to restarted the server.

Test the application

Go to the following URL to see the application running:


Note: 8080 is the default port for the web server; if you installed on a different port you will need to that value here.

Additional information

Need some BluePrints to help in your design work? Visit the Java BluePrints project, also hosted at java.net, for best practices, guidelines, and applications for designing enterprise applications and Web services using Java technologies.

Additional information on configuring the server can be found in the documentation for the previous version of the server, Sun Java System Application Server PE 8.x. 

The How-to link has userful information about connecting to other databases and resolving common installation problems.