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 198287 - path attribute in context.xml is getting updated incorrectly.
Summary: path attribute in context.xml is getting updated incorrectly.
Status: RESOLVED DUPLICATE of bug 186624
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-03 16:04 UTC by berryware
Modified: 2011-10-21 10:59 UTC (History)
0 users

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 berryware 2011-05-03 16:04:22 UTC
Product Version = NetBeans IDE 7.0 (Build 201104080000)
Operating System = Mac OS X version 10.6.7 running on x86_64
Java; VM; Vendor = 1.6.0_24
Runtime = Java HotSpot(TM) 64-Bit Server VM 19.1-b02-334

Firstly I believe it is a bug that the path attribute is getting updated at all. If I supply a context.xml in META-INF, DO NOT MODIFY IT.

Secondly, If I am using a profile variable to set the finalName of the war, the path attribute is getting set to the unfiltered variable name.

from the pom.xml

<build>
.
.
.
    <finalName>${war.finalname}</finalName>
</build>

from my profiles.xml
<properties>
  <war.finalname>dss-local</war.finalname>
</properties>

context.xml

<Context cookies="true" override="true" path="${war.finalname}">
</Context>
Comment 1 orolo 2011-08-05 09:18:41 UTC
I think it is even worse: Setting the path attribute at all is a bug.

The "Tomcat7 Configuration Reference" states:
"The value of this field must not be set except when statically defining a Context in server.xml, as it will be inferred from the filenames used for either the .xml context file or the docBase."

see: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Common_Attributes
or http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Common_Attributes
or http://tomcat.apache.org/tomcat-5.5-doc/config/context.html#Common_Attributes
Comment 2 Petr Hejl 2011-10-21 10:59:21 UTC

*** This bug has been marked as a duplicate of bug 186624 ***