JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1 Administration Guide
search filter icon
search icon

Document Information

Preface

1.  Overview of GlassFish Server Administration

Default Settings and Locations

Configuration Tasks

Administration Tools

Instructions for Administering GlassFish Server

Part I Runtime Administration

2.  General Administration

3.  Administering Domains

4.  Administering the Virtual Machine for the Java Platform

5.  Administering Thread Pools

6.  Administering Web Applications

7.  Administering the Logging Service

8.  Administering the Monitoring Service

9.  Writing and Running JavaScript Clients to Monitor GlassFish Server

10.  Administering Life Cycle Modules

11.  Extending and Updating GlassFish Server

Part II Resources and Services Administration

12.  Administering Database Connectivity

13.  Administering EIS Connectivity

14.  Administering Internet Connectivity

About Internet Connectivity

About HTTP Network Listeners

About Virtual Servers

Administering HTTP Network Listeners

To Create an Internet Connection

Administering HTTP Protocols

To Create a Protocol

To List Protocols

To Delete a Protocol

Administering HTTP Configurations

To Create an HTTP Configuration

To Delete an HTTP Configuration

Administering HTTP Transports

To Create a Transport

To List Transports

To Delete a Transport

Administering HTTP Network Listeners

To Create an HTTP Network Listener

To List HTTP Network Listeners

To Update an HTTP Network Listener

To Delete an HTTP Network Listener

To Configure an HTTP Listener for SSL

To Delete SSL From an HTTP Listener

To Assign a Default Virtual Server to an HTTP Listener

Administering Virtual Servers

To Create a Virtual Server

To List Virtual Servers

To Update a Virtual Server

To Delete a Virtual Server

To Assign a Default Web Module to a Virtual Server

To Assign a Virtual Server to an Application or Module

To Set JSESSIONIDSSO Cookie Attributes

15.  Administering the Object Request Broker (ORB)

16.  Administering the JavaMail Service

17.  Administering the Java Message Service (JMS)

18.  Administering the Java Naming and Directory Interface (JNDI) Service

19.  Administering Transactions

Part III Appendixes

A.  Subcommands for the asadmin Utility

Index

Administering HTTP Network Listeners

By default, when GlassFish Server starts, the following HTTP listeners are started automatically:

The following table describes the GlassFish Server default ports for the listeners that use ports.

Table 14-1 Default Ports for Listeners

Listener
Default Port
Description
Administrative server
4848
A domain’s administrative server is accessed by the Administration Console and the asadmin utility. For the Administration Console, specify the port number in the URL of the browser. When running an asadmin subcommand remotely, specify the port number by using the --port option.
HTTP
8080
The web server listens for HTTP requests on a port. To access deployed web applications and services, clients connect to this port.
HTTPS
8181
Web applications configured for secure communications listen on a separate port.

The following topics are addressed here:

To Create an Internet Connection

Use the subcommands in this procedure to create an internet connection with the full range of listener options. A network listener is created behind the scenes. For the shortcut version of this process , see To Create an HTTP Network Listener.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Create an HTTP or HTTPS protocol by using the create-protocol(1) subcommand with the --securityenabled option.

    To use the built-in http-listener-1 HTTP protocol, or http-listener-2 HTTPS protocol, skip this step.

  3. Create an HTTP configuration by using the create-http(1) subcommand.

    To use a built-in protocol, skip this step.

  4. Create a transport by using the create-transport(1) subcommand.

    To use the built-in tcp transport, skip this step.

  5. (Optional) Create a thread pool by using the create-threadpool(1) subcommand.

    To avoid using a thread pool, or to use the built-in http-thread-pool thread pool, skip this step.

    For additional thread pool information, see Chapter 5, Administering Thread Pools.

  6. Create an HTTP listener by using the create-network-listener(1) subcommand.

    Specify a protocol and transport, optionally a thread pool.

  7. To apply your changes, restart GlassFish Server.

    See To Restart a Domain.

See Also

You can also view the full syntax and options of the subcommand by typing a command such as asadmin help create-http-listener at the command line.

Administering HTTP Protocols

Each HTTP listener has an HTTP protocol, which is created either by using the create-protocol subcommand or by using the built-in protocols that are applied when you follow the instructions in To Create an HTTP Network Listener.

The following topics are addressed here:

To Create a Protocol

Use the create-protocol subcommand in remote mode to create a protocol.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Create a protocol by using the create-protocol(1)

    Information about options and properties for the subcommand are included in this help page.

Example 14-1 Creating an HTTP Protocol

This example creates a protocol named http-1 with security enabled.

asadmin> create-protocol --securityenabled=true http-1
Command create-protocol executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help create-protocol at the command line.

To List Protocols

Use the list-protocols subcommand in remote mode to list the existing HTTP protocols.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. List the existing protocols by using the list-protocols(1) subcommand.

Example 14-2 Listing the Protocols

This example lists the existing protocols.

asadmin> list-protocols
admin-listener
http-1
http-listener-1
http-listener-2
Command list-protocols executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help list-protocols at the command line.

To Delete a Protocol

Use the delete-protocol subcommand in remote mode to remove a protocol.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Delete a protocol by using the delete-protocol(1) subcommand

Example 14-3 Deleting a Protocol

This example deletes the protocol named http-1.

asadmin> delete-protocol http-1
Command delete-protocol executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help delete-protocol at the command line.

Administering HTTP Configurations

Each HTTP listener has an HTTP configuration, which is created either by using the create-http subcommand or by using the built-in configurations that are applied when you follow the instructions in To Create an HTTP Network Listener.

The following topics are addressed here:

To Create an HTTP Configuration

Use the create-http subcommand in remote mode to create a set of HTTP parameters for a protocol. This set of parameters configures one or more network listeners,

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Create an HTTP configuration by using the create-http(1) subcommand.

    Information about options and properties for the subcommand are included in this help page.

Example 14-4 Creating an HTTP Configuration

This example creates an HTTP parameter set for the protocol named http-1.

asadmin> create-http --timeout-seconds 60 --default-virtual-server server http-1
Command create-http executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help create-http at the command line.

To Delete an HTTP Configuration

Use the delete-http subcommand in remote mode to remove HTTP parameters from a protocol.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Delete the HTTP parameters from a protocol by using the delete-http(1) subcommand.

Example 14-5 Deleting an HTTP Configuration

This example deletes the HTTP parameter set from a protocol named http-1.

asadmin> delete-http http-1
Command delete-http executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help delete-http at the command line.

Administering HTTP Transports

Each HTTP listener has an HTTP transport, which is created either by using the create-transport subcommand or by using the built-in transports that are applied when you follow the instructions in To Create an HTTP Network Listener.

The following topics are addressed here:

To Create a Transport

Use the create-transport subcommand in remote mode to create a transport for a network listener,

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Create a transport by using the create-transport(1) subcommand.

    Information about options and properties for the subcommand are included in this help page.

Example 14-6 Creating a Transport

This example creates a transport named http1-trans that uses a non-default number of acceptor threads.

asadmin> create-transport --acceptorthreads 100 http1-trans
Command create-transport executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help create-transport at the command line.

To List Transports

Use the list-transports subcommand in remote mode to list the existing HTTP transports.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. List the existing transports by using the list-transports(1) subcommand.

Example 14-7 Listing HTTP Transports

This example lists the existing transports.

asadmin> list-transports
http1-trans
tcp
Command list-transports executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help list-transports at the command line.

To Delete a Transport

Use the delete-transport subcommand in remote mode to remove a transport.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Delete a transport by using the delete-transport(1) subcommand.

Example 14-8 Deleting a Transport

This example deletes he transport named http1-trans.

asadmin> delete-transport http1-trans
Command delete-transport executed successfully. 

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help delete-transport at the command line.

Administering HTTP Network Listeners

The following topics are addressed here:

To Create an HTTP Network Listener

Use the create-http-listener subcommand or the create-network-listener subcommand in remote mode to create a listener. These subcommands provide backward compatibility and also provide a shortcut for creating network listeners that use the HTTP protocol. Behind the scenes, a network listener is created as well as its associated protocol, transport, and HTTP configuration. This method is a convenient shortcut, but it gives access to only a limited number of options. If you want to specify the full range of listener options, follow the instructions in To Create an Internet Connection.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Create an HTTP network listener by using the create-network-listener(1) subcommand or the create-http-listener(1) subcommand.
  3. If needed, restart the server.

    If you edit the special HTTP network listener named admin-listener, you must restart the server for changes to take effect. See To Restart a Domain.

Example 14-9 Creating an HTTP Listener

This example creates an HTTP listener named sampleListener that uses a non-default number of acceptor threads. Security is not enabled at runtime.

asadmin> create-http-listener --listeneraddress 0.0.0.0 --listenerport 7272 --defaultvs server --servername host1.sun.com --acceptorthreads 100 --securityenabled=false --enabled=false sampleListener
Command create-http-listener executed successfully.

Example 14-10 Creating a Network Listener

This example a network listener named sampleListener that is not enabled at runtime:

asadmin> create-network-listener --listenerport 7272 protocol http-1 --enabled=false sampleListener
Command create-network-listener executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help create-http-listener or asadmin help create-network-listener at the command line.

To List HTTP Network Listeners

Use the list-http-listeners subcommand or the list-network-listeners subcommand in remote mode to list the existing HTTP listeners.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. List HTTP listeners by using the list-http-listeners(1) or list-network-listeners(1) subcommand.

Example 14-11 Listing HTTP Listeners

This example lists the HTTP listeners. The same output is given if you use the list-network-listeners subcommand.

asadmin> list-http-listeners
admin-listener
http-listener-2
http-listener-1
Command list-http-listeners executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help list-http-listeners or asadmin help list-network-listeners at the command line.

To Update an HTTP Network Listener

  1. List HTTP listeners by using the list-http-listeners(1) or list-network-listeners(1) subcommand.
  2. Modify the values for the specified listener by using the set(1) subcommand.

    The listener is identified by its dotted name.

Example 14-12 Updating an HTTP Network Listener

This example changes security-enabled to false on http-listener-2.

asadmin> set server.network-config.protocols.protocol.http-listener-2.security-enabled=false
Command set executed successfully.

To Delete an HTTP Network Listener

Use the delete-http-listener subcommand or the delete-network-listener subcommand in remote mode to delete an existing HTTP listener. This disables secure communications for the listener.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. List HTTP listeners by using the list-http-listeners(1) subcommand.
  3. Delete an HTTP listener by using the delete-http-listener(1) or delete-network-listener(1) subcommand.
  4. To apply your changes, restart GlassFish Server.

    See To Restart a Domain.

Example 14-13 Deleting an HTTP Listener

This example deletes the HTTP listener named sampleListener:

asadmin> delete-http-listener sampleListener
Command delete-http-listener executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help delete-http-listener or asadmin help delete-network-listener at the command line.

To Configure an HTTP Listener for SSL

Use the create-ssl subcommand in remote mode to create and configure an SSL element in the specified listener. This enables secure communication for the listener.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Configure an HTTP listener by using the create-ssl(1) subcommand.
  3. To apply your changes, restart GlassFish Server.

    See To Restart a Domain.

Example 14-14 Configuring an HTTP Listener for SSL

This example enables the HTTP listener named http-listener-1 for SSL:

asadmin> create-ssl --type http-listener --certname sampleCert http-listener-1
Command create-ssl executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help create-ssl at the command line.

To Delete SSL From an HTTP Listener

Use the delete-ssl subcommand in remote mode to delete the SSL element in the specified listener. This disables secure communications for the listener.

  1. Ensure that the server is running.

    Remote subcommands require a running server.

  2. Delete SSL from an HTTP listener by using the delete-ssl(1) subcommand.
  3. To apply your changes, restart GlassFish Server.

    See To Restart a Domain.

Example 14-15 Deleting SSL From an HTTP Listener

This example disables SSL for the HTTP listener named http-listener-1:

asadmin> delete-ssl --type http-listener http-listener-1
Command delete-http-listener executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help delete-ssl at the command line.

To Assign a Default Virtual Server to an HTTP Listener

  1. In the Administration Console, open the HTTP Service component under the relevant configuration.
  2. Open the HTTP Listeners component under the HTTP Service component.
  3. Select or create a new HTTP listener.
  4. Select from the Default Virtual Server drop-down list.

    For more information, see To Assign a Default Web Module to a Virtual Server.

See Also

For details, click the Help button in the Administration Console from the HTTP Listeners page.