COMP 655: Distributed/Operating Systems - Summer 2011
2024-05-12 15:01:05 UTC
Home
Lectures
Assignments
Books, web, tools
 
Turnitin.com
Guidelines
Writing help
Plagiarism
 
DiNo
Glassfish
RESTful client
Menu service
JAX-RS
JAXB
EJB
Java
 
Bulletin board
Contact
 

How to install GlassFish 3.1


Step 1

Go to the Glassfish download page: http://www.oracle.com/technetwork/java/javaee/downloads/index.html

Step 2

Download the Java EE 6 Development Kit Bundles with JDK Java EE 6 SDK Update 2 which includes:

  • JDK 6 Update 24
  • GlassFish Server Open Source Edition 3.1
  • Java EE 6 Code Samples
  • Java EE 6 API Documentation
  • Java EE 6 Tutorial
  • Your First Cup: An Introduction to the Java EE Platform

Step 3

You will be asked to select the platform and language

Step 4

Download Java EE 6 SDK Update 2 (with JDK 6 U24). If you choose Windows and English, the file name is: java_ee_sdk-6u2-jdk-windows.exe, size: 131.35 MB.

Step 5

When download is done, run the installation file

Step 6

You may just go with the defaul parameters, which will install GlassFish in c:\glassfish3

Step 7

You will see a summary page when the installation is done

Step 8

Point your browser at http://localhost:8080

You should see a page that says "Your Application Server is now running"

Step 9

Download hello.war into the C:\glassfish3\glassfish\domains\domain1\autodeploy folder (it will be referred to as the autodeploy folder from now on). If your browser changes the extension from .war to .zip - that's OK for an autodeployed web application and is less likely to happen - do NOT change the extension (past experience is that changing the file extension in the autodeploy folder confuses GlassFish).

After the hello.war_deployed or hello.zip_deployed file appears in the autodeploy folder, point your browser at http://localhost:8080/hello/

You should see the "Hi, my name is Duke" page 

Alternatively, you may use the Administration Console to deloy this sample app:

  • Launch the Administration Console by typing the following URL in your browser: http://localhost:4848
  • Click the Applications node in the tree on the left. The Applications page is displayed.
  • Click the Deploy button. The Deploy Applications or Modules page is displayed.
  • Select Packaged File to be Uploaded to the Server, and click Browse.
  • Navigate to the location in which you saved the hello.war sample, select the ile, and click Open. You are returned to the Deploy Applications or Modules page.
  • Specify a description in the Description field, for example: hello
  • Accept the other default settings, and click OK. You are returned to the Applications page.
  • Select the check box next to the hello application and click the Launch link to run the application. The default URL for the application is: http://localhost:8080/hello/

Step 10

Download the restful-client into the autodeploy folder

After the restful-client.war_deployed file appears, continue with Step 11

More about the RESTful client

Step 11

Download menu.war into the autodeploy folderfolder

After the menu.war_deployed file appears, point your browser at http://localhost:8080/restful-client/

You should see a page titled "RESTful web service client"

Click the GET button

In the lower right-hand frame, you should see "<menu-list/>"

More about the menu service

Step 12 - troubleshooting

You can view the server's log file with the admin console, or on Windows, you can use this script, that copies the glassfish server log file into the current folder and opens it with wordpad