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.
Change context path in sun-web.xml (for AppServer) or in context.xml (for Tomcat). Now look at project properties. Context Path here is unchanged.
works for me, describe exact steps how to reproduce
1. Create new Web Application for Tomcat 2. Open context.xml 3. Change Context Path 4. Save context.xml 5. Open project properties, look at Context Path property
Ok, thanks, now I can reproduce it. Looks like this is in j2eeserver.
Stepan, did you make any changes in this area recently?
this is still a problem even after Stepan's changes
*** Issue 55985 has been marked as a duplicate of this issue. ***
I haven't fixed this yet. In nb4.0 web project did not store its context path in the project properties and took it always directly from the server specific config file (context/sun-web.xml). Starting from nb4.1 the context path is stored in the project properties but its value is not currently updated after it is changed directly in the context/sun-web.xml. This will most likely require an api change that would allow projects to listen to context path changes. Something like J2eeModuleProvider.ConfigSupport.add/removePropertyChangeListener a J2eeModuleProvider.ConfigSupport.PROP_CONTEXT_PATH.
I think there might be a strong relationship between the Context Path item in the project properties file and the Context Path field in the (1)"New Web Application" and (2)"New Web Application with Existing Sources" wizards. What is the relationship? (1) Will it be stored in the server specific DDs? (2) How it will be used in this one? The project probably already contains a server specific deployment descriptor, which will have to be used by the plugins.
The value entered in wizard is actually stored in server specific data file for the selected server. It is not stored in the properties file at this point. This is OK since the only code that reads it from the project.properties is the project customizer :-) The deployment (build-impl.xml) takes the value from server specific data. At least it will make it easier to remove the context.path property... Surprisingly, some modules do not have the value in server specific data. Note that we did not have that until nb 3.6 when we started to use jsr88 - we stored the value separately (well, in filesystem attributes, which is not very nice, but it worked). Some users can store it in build script, in a property file, etc. they just pass it as a parameter for deployment. Or they may have deployed the module manually via admin GUI and not have the server specific configuration. So I would keep the UI. But as long as we use jsr88 I'd store it in server spec data only. (Freeform project is a different story. There we do not use the Context Path for deployment, we only use it to attach the debugger to the right module. So there it is appropriate to store it in project.xml. But I guess this was clear anyway..)
cvs commit -m "55076 Context Path property is not updated" src\org\netbeans\modules\web\project\ui\customizer\WebProjectProperties.java (in directory C:\nb_all\web\project\) Checking in src/org/netbeans/modules/web/project/ui/customizer/WebProjectProperties.java; /cvs/web/project/src/org/netbeans/modules/web/project/ui/customizer/WebProjectProperties.java,v <-- WebProjectProperties.java new revision: 1.88; previous revision: 1.87 done
verified