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.
1. Create a new web application A1, and while creating it, set the context root to a non-default value, e.g. /mypath 2. Build the application 3. Start GlassFish from NetBeans 4. On the command line and deploy the app using: asadmin deploy --force=true <path-to-A1>/dist/A1.war -> the application is deployed to path /mypath as expected 5. Create another web application A2, and while creating it, set the context root to empty value 6. Build application A2 7. On the command line and deploy the app using: asadmin deploy --force=true <path-to-A2>/dist/A2.war The application is deployed to path /A2, which is inconsistent with what I entered as the value of the context root.
The plugin is while deploying webapp with empty context path passed "/" for context-root via the deploy command. Whn project is deployed via ant, this handling does not happen causing the different behavior. Fix would be to update the plugin sun-web.xml editor to use "/" when passed a empty context path.
Fixed http://hg.netbeans.org/web-main/rev/b9c045eb4b6c