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.
Steps to reproduce: 1) Create a new "Enterprise Application" project called "Foolicious", and have it also create the web application within it. 2) Deploy your project to glassfish and run it http://localhost:8080/Foolicious-war/ 3) Surrender to your obsessive-compulsive disorder that likes short URLs by going into the Foolicious-war project's properties, under the Run tab, and change the Context Path to "/foo" 4) clean, build and deploy everything, and run it again. 5) Look, in dismay, at the unchanged URL in your browser, and wonder why it didn't get changed to http://localhost:8080/foo/ 6) Look at the enterprise project's Properties panel to see if it has a separate place to set the war's context path. See that it has no such field, and become depressed.
The context root for a web app in an ear is specified by the application.xml file (if it exists... otherwise, a default value is used [based on the name of the war file]). I am not sure that creating GUI editor for application.xml is really the way to address this issue. We may want to extend the EAR project properties dialog to manage these values...
The name of the war seems like a strange choice for the default, when the war itself contains the intended context path. Is there a reason for not using it?
The context-root is a vendor specific notion. One of the goals behind Java EE 5 was to eliminate the dependence on deployment descriptor files... both the "standard" dd and any vendor specific dd.
I think I understand what you're saying: the war's context path is stored in the sun-web.xml deployment descriptor (which is vendor-specific). I take it that the application.xml deployment descriptor vendor-neutral? If that's the case, it would be nice to see the application.xml file created at the time the project is created...and to have the ear project properties dialog offer a field for setting the context path, as you suggested.
It's not really clear/easy how to "correctly" solve this situation. I will discuss it with more people here and let you know. One notice - you can create application.xml later, just use New -> Standard Deployment Descriptor action. Thanks for reporting.
*** Issue 149258 has been marked as a duplicate of this issue. ***
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss