You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/07/05 13:41:26 UTC
DO NOT REPLY [Bug 49551] New: When setting absolute path to default
context.xml, in ContextConfig.contextConfig() it cannot be found
https://issues.apache.org/bugzilla/show_bug.cgi?id=49551
Summary: When setting absolute path to default context.xml, in
ContextConfig.contextConfig() it cannot be found
Product: Tomcat 6
Version: 6.0.26
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: violetagg@apache.org
Hi,
I'm using an Embedded Tomcat.
I want to use the Tomcat's functionality - default context.xml.
I'm extending the org.apache.catalina.startup.ContextConfig.
Sometimes the default context.xml is outside of the "base" directory, because
of this I'm using the following method to set the location - in the java doc it
is stated that an absolute path is acceptable for method parameter.
http://svn.apache.org/repos/asf/tomcat/tc6.0.x/tags/TOMCAT_6_0_26/java/org/apache/catalina/startup/ContextConfig.java
218 /**
219 * Set the location of the default context file
220 *
221 * @param path Absolute/relative path to the default context.xml
222 */
223 public void setDefaultContextXml(String path) {
224
225 this.defaultContextXml = path;
226
227 }
When ContextConfig.contextConfig() method is invoked, a wrong path is generated
for the default context.xml
i.e.
If the base directory is d:/base-dir
and the path to the default context.xml is
d:/other-dir/configuration/context.xml
the following is generated:
d:/base-dir/d:/other-dir/configuration/context.xml
This happens in ContextConfig.java:
715 /**
716 * Process the default configuration file, if it exists.
717 */
718 protected void contextConfig() {
...
728 processContextConfig(new File(getBaseDir()), defaultContextXml);
...
734 }
737 /**
738 * Process a context.xml.
739 */
740 protected void processContextConfig(File baseDir, String resourceName) {
...
749 File file = baseDir;
750 if (resourceName != null) {
751 file = new File(baseDir, resourceName);
752 }
...
819 }
Could you please clarify whether it is possible to use this setter method with
absolute paths?
Thanks in advance
Regards
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 49551] When setting absolute path to default context.xml, in
ContextConfig.contextConfig() it cannot be found
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49551
--- Comment #3 from Jackie Rosen <ja...@hushmail.com> ---
*** Bug 260998 has been marked as a duplicate of this bug. ***
Seen from the domain http://volichat.com
Page where seen: http://volichat.com/adult-chat-rooms
Marked for reference. Resolved as fixed @bugzilla.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 49551] When setting absolute path to default
context.xml, in ContextConfig.contextConfig() it cannot be found
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49551
--- Comment #1 from Mark Thomas <ma...@apache.org> 2010-07-05 17:10:22 EDT ---
Thanks for the bug report. I have fixed in this in 7.0.x (it will be in 7.0.1
onwards) and proposed the fix for 6.0.x.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 49551] When setting absolute path to default
context.xml, in ContextConfig.contextConfig() it cannot be found
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49551
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Mark Thomas <ma...@apache.org> 2010-07-16 06:14:50 EDT ---
This has been fixed in 6.0.x and will be included in 6.0.29 onwards.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org