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 maven web application 2. open the project properties and go to the "Run" page 3. specify a server (I use Tomcat) 4. specify a context path or leave the generated one 5! click OK. The created "context.xml" looks like this (note the context path is blank instead of what was specified): <?xml version="1.0" encoding="UTF-8"?> <Context antiJARLocking="true" path=""/> If you go back into project properties and specify the context path a second time it will then be remembered. This is a P1 because of the potential for data loss (which happened to me). If you deploy this project to a server, it will overwrite the root context (at least it does on Tomcat). If you don't have a copy of what was there and you can't build it, you're hosed.
It is almost a duplicate of bug 202662. But I tried it also with GlassFish and if I set context path the first time after project creation, it is lost. So I expect fixes will be needed both in maven project and tomcat server plugin.
not a stopper for NB 7.1 Beta
Sounds pretty identical to bug #202662
*** Bug 202662 has been marked as a duplicate of this bug. ***
This is a synchronization issue which has been in the code for a while just constalation was not right for it to get triggered. During debugging this problem never happened. Fixed in web-main #edadd265e514. There were two problems. One was that when WebRunCustomizerPanel is changing server (hackModuleServerChange()) it was done in ProjectManager.mutex().postReadRequest but web context value update was not and therefore occured (sometimes) too early (before server was changed in project lookup). Second change is in POHImpl.obtainServerIds which was too complicated (for some reason) and read two properties from two different places (one is stored in pom.xml and second in auxiliary properties somewhere in userdirectory). And again depending on timing new value of serverID property (from pom.xml) would not be available yet. The thing is that serverID property is actually less important that serverInstanceID property (stored via AuxProperties) so I changed the code to read that one first and everything seems to be working correctly now.
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/edadd265e514 User: David Konecny <dkonecny@netbeans.org> Log: #202760 - context path is set to a blank string in Maven web applications
yup.