Glassfish Application Server

Post on 25-Jun-2015

39 views 4 download

Tags:

transcript

Glassfish Application Server

Contents

• Application Servers

• Introduction to Glassfish Application Server

• Start and Stop the glassfish server using batch file and command line

• Glassfish admin console

• Deploy and Undeploy a web application

• View WSDL option of Glassfish

Introduction to Glassfish

• GlassFish is an open source application server project for the Java EE platform.

• An application server is a software framework dedicated to the efficient execution of procedures (programs, routines, scripts).

• An application server is used for supporting the construction of applications.

Introduction to Glassfish Cont.

• The application server acts as a set of components accessible to the software developer through an API defined by the platform itself

• GlassFish is based on source code released by Sun and Oracle Corporation.

• It uses a derivative of Apache Tomcat as the servlet container for serving Web content.

Starting and Stopping the glassfish server

• Start and Stop of the Glassfish server can be done using three ways:– Using the Netbeans IDE in the Services

window servers submenu– In the Glassfish installation path

startserv.bat and stopserv.bat files– In the command line using the asadmin

command

The Glassfish Admin Console

• The Admin console is a web page which is used by the Glassfish users to interact with the application server.

• The port in which the application server’s admin console can be found depends on the default port given by the user while installation.

• By default the URL for Glassfish admin console is: http://localhost:4848/

• The default username and password for admin console are “admin” and “adminadmin” respectively

Admin Console Login

Admin Console Start Page

Deploying and Undeploying Archive files

• Deploy or Undeploy can be done in four different ways:– Using the Netbeans IDE– Using the asadmin command in the command

line

– Using the Auto deploy folder in the glassfish installation path (Example - C:\Sun\AppServer\domains\domain1\autodeploy)

– Using the Admin console of Glassfish application server.

Using the Admin Console to Deploy and Undeploy

• After logging into the Admin Console in the left panel select the web applications and the web applications window will be displayed.

• In the Web Applications window, click on the Deploy button to deploy any Archive file.

• On clicking on Deploy the Deploy window will be shown.

• For undeploying a web application, go to the web applications window and select the web application to be undeployed using the check box provided and click on undeploy.

Using the Admin Console to Deploy and Undeploy

Using the Admin Console to Deploy and Undeploy

Using the Admin Console to Deploy and Undeploy

• In the Web Applications window select the Archive file type.

• Browse the file using the given browse option.• Then press on OK when done.• Now the Archive file will be deployed and it will

be shown in the list of files deployed in the web application window.

• Now that the file is deployed, it can be run or undeployed using the Admin console web application window.

Using the Admin Console to Deploy and Undeploy

View WSDL option of Glassfish

• The WSDL for a Web service created can be viewed using the Glassfish Admin Console.

• It is very useful in the case of using the web services in ASP.NET programming and while Unit Testing the Web services.

• The View WSDL option is available in the Web Services Window which can be found in the left panel of the Admin Console.

• The Web Services window displays all the web services which have been deployed.

View WSDL option in Web Services

References

• Introduction to Glassfish:– http://java.sun.com/developer/technicalArticles/glassfish/

GFBasics.html

• Detailed introduction to Glassfish Application Server:– https://glassfish.dev.java.net/downloads/quickstart/v3-

preview2.html