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.

Bug 146493 - Webapp being "deployed" twice when run
Summary: Webapp being "deployed" twice when run
Status: NEW
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Webserver (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@serverplugins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-08 12:53 UTC by lamski
Modified: 2008-09-08 12:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lamski 2008-09-08 12:53:19 UTC
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.