I use Netbeans 6.7 to develop Java servlet. It defaults to port 8080. How do I change the port number to 8083 fo开发者_StackOverflowr example?
You can change the port, using the property editors available on the Servers dialog.
Select the Servers item from the Tools menu.alt text http://www.freeimagehosting.net/uploads/e8ed5c303e.png
This image was captured from 6.8... but the dialog has been available (pretty much unchanged) since NetBeans 4.1.
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.
1.Just search server.xml file in the conf directory [within tomcat installation folder]
2.Search for content like following:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
- change the port attribute to any other port number.
source: http://ohmjavaclasses.blogspot.com/2012/01/how-to-change-port-number-of-tomcat.html
- GO to Tools > Servers.
- Dialog box opens up
- Change the port under "server port:" Try with increamenting or decreamenting the portnumber if it still takes time to run the jsp page
- Uninstall netbeans, glassfishserver, Tomcat open source code. then reinstall latest JAVA SE from the mother website www.netbeans.org.
精彩评论