views:

155

answers:

2

I use Netbeans 6.7 to develop Java servlet. It defaults to port 8080. How do I change the port number to 8083 for example?

+2  A: 

This depends on the servlet container or application server you are using.

In tomcat, for example, this is done by changing the port attribute of the Connector for HTTP/1.1 in tomcat/conf/server.xml. In other containers it would be similar to this - somewhere in the configurations.

Bozho
Thanks. So there is nothing in the Netbeans GUI that I can change this setting ?
Frank
Do you use the web server shipping with Tomcat?
Thorbjørn Ravn Andersen
Yes, Tomcat 6.0
Frank
+1  A: 

You can change the port, using the property editors available on the Servers dialog.

Select the Servers item from the Tools menu.alt text

This image was captured from 6.8... but the dialog has been available (pretty much unchanged) since NetBeans 4.1.

vkraemer
Great, thanks, I didn't know you could attach images, wonderful !
Frank