In the subdirectory glassfish/domains/domain1/config edit the file domain.xml. Search for network-listener port (or for 8080) and change the value to the desired port number.

The same can be achieved using the web console (and it's probably safer too): Configuration > Network Config >
Network listeners > http-listener-1

With the command-line (also safer than editing XML by hand):

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