users@glassfish.java.net

Re: glassfish-3.1.1

From: Tom Mueller <tom.mueller_at_oracle.com>
Date: Thu, 13 Oct 2011 08:55:30 -0500

There are several ways to do this.

1) When creating the domain, you can pass in the value for the HTTP
port to the create-domain command:

asadmin create-domain --instanceport=9080 mydomain

See
http://download.oracle.com/docs/cd/E18930_01/html/821-2433/create-domain-1.html#scrolltoc
for details.

2) If you can get the server started (by stopping the process that is
current listening on 8080), then you can use the following command to
change the port number:

asadmin set
configs.config.server-config.network-config.network-listeners.network-listener.http-listener-1.port=9080

3) You can edit the glassfish/domains/mydomain/config/domain.xml file
and replace 8080 with the desired port in the following element:

<network-listener port="8080" protocol="http-listener-1" transport="tcp"
name="http-listener-1" thread-pool="http-thread-pool"></network-listener>

Then start the server.

Tom