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 55076 - Context Path property is not updated
Summary: Context Path property is not updated
Status: CLOSED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Pavel Buzek
URL:
Keywords:
: 55985 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-16 16:41 UTC by L Martinek
Modified: 2006-03-24 13:15 UTC (History)
2 users (show)

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 L Martinek 2005-02-16 16:41:51 UTC
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.
Comment 1 Pavel Buzek 2005-02-17 08:24:07 UTC
works for me, describe exact steps how to reproduce
Comment 2 L Martinek 2005-02-17 09:04:34 UTC
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
Comment 3 Pavel Buzek 2005-02-22 02:08:37 UTC
Ok, thanks, now I can reproduce it. Looks like this is in j2eeserver.
Comment 4 Petr Jiricka 2005-03-19 06:21:54 UTC
Stepan, did you make any changes in this area recently?
Comment 5 Pavel Buzek 2005-03-19 16:56:21 UTC
this is still a problem even after Stepan's changes
Comment 6 Sherold Dev 2005-03-21 09:05:22 UTC
*** Issue 55985 has been marked as a duplicate of this issue. ***
Comment 7 Sherold Dev 2005-03-21 09:40:31 UTC
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.
Comment 8 Jiri Kopsa 2005-04-01 13:17:08 UTC
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.
Comment 9 Pavel Buzek 2005-04-02 14:53:39 UTC
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..)
Comment 10 Pavel Buzek 2005-04-02 22:43:50 UTC
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
Comment 11 L Martinek 2005-04-04 13:07:45 UTC
verified