Friday, September 18, 2009

Glassfish Enterprise Server: Changing Port

I couldn't find a straight and good answer easily. So, here's what you to change the port your server is listening on:
  • start the server
  • go to admin console (default: http://localhost:4848)
  • Open: Configuration -> HTTP Service -> Network Config -> Network Listeners
  • The main port is listed as the listener1, I believe.
That's it. Simple. You don't even need to restart the server for the change to take effect.

Changing it by editing the domain.xml file is possible, but the server always chokes for a while to accept it. You can also use asadmin get server and asadmin set ... but this is still more messy than just doing it in the console.

1 comment:

Francisco said...

Great. It works. Thanks a lot.