This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
There is currently a bug in how netbeans handles deployment and running of webapp projects. On first run, the webapp is deployed on the webserver. But on succeeding runs (where the webserver is not yet started), netbeans will first start the webserver causing the webserver to run the webapp, then right after that, netbeans will redeploy the webapp thereby running it twice. Previous versions of Netbeans (5.x) did not have this problem. This is a bit problematic if your project creates "persistent" services e.g. RMI registries that listen on a particular port - on the second run, the port is already being used be the first one. Netbeans just maps the deploy directory of the webapp in the webserver's list of deployed webapps. So my current workaround is to clean and build the webapp then instead of "running" the project, I go to the Services/Servers tab then start the webserver where the webapp is deployed. This avoids the case where Netbeans will attempt to redeploy the webapp.