I have Netbeans IDE version 6.8, and Glassfish version 3. My glassfish listener is set to port 81, but when I try to run the simplest web application via the Netbenas IDE it tries to run it on port 8080. where can I change it ? Using port 8080 for my web application is out of the question for me.
Locate config folder which may be as follows:
C:\Program Files\glassfish-3.0.1\glassfish\domains\domain1\config
Open domain.xml using any text editor.
Look for 8080 and change it to some other port number that doesn’t conflict with other port numbers.
source: http://ohmjavaclasses.blogspot.com/2012/01/how-to-change-port-number-for-glassfish.html