17
Glassfish Application Server

Glassfish Application Server

Embed Size (px)

Citation preview

Page 1: Glassfish Application Server

Glassfish Application Server

Page 2: 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

Page 3: Glassfish Application Server

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.

Page 4: Glassfish Application Server

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.

Page 5: Glassfish Application Server

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

Page 6: Glassfish Application Server

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

Page 7: Glassfish Application Server

Admin Console Login

Page 8: Glassfish Application Server

Admin Console Start Page

Page 9: Glassfish Application Server

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.

Page 10: 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.

Page 11: Glassfish Application Server

Using the Admin Console to Deploy and Undeploy

Page 12: Glassfish Application Server

Using the Admin Console to Deploy and Undeploy

Page 13: Glassfish Application Server

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.

Page 14: Glassfish Application Server

Using the Admin Console to Deploy and Undeploy

Page 15: Glassfish Application Server

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.

Page 16: Glassfish Application Server

View WSDL option in Web Services

Page 17: Glassfish Application Server

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