- Go
to the folder where Glassfish in installed.
- Go
into config folder which is as follows: c:\netbeans6.8\glassfish-3\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. I generally change it to 9999.
- Save
domain.xml.
- Now
you need to remove GlassFish from NetBeans and add it again so that
NetBeans IDE understands the new port number. For this do the following
:
- In Servers window
of NetBeans, remove GlassFish by using RemoveServer button
after selecting GlassFish server.
- Click
on AddServer and select GlassFish V2 or GlassFish V3 and
click on Next.
- Select
the Installation Location of GlassFish and click on Next.
- Accept
defaults and click on Finish.
- Restart
GlassFish, if it was already running.