Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342505 - Tomcat 6 Server "Publish module contexts to separate XML files" fails with '/' in context root
Summary: Tomcat 6 Server "Publish module contexts to separate XML files" fails with '/...
Status: RESOLVED FIXED
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: wst.server (show other bugs)
Version: 3.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.3   Edit
Assignee: Larry Isaacs CLA
QA Contact: Angel Vera CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-11 22:29 EDT by Mike Youngstrom CLA
Modified: 2017-10-11 16:36 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Youngstrom CLA 2011-04-11 22:29:43 EDT
Tomcat 6 Server setting "Publish module contexts to separate XML files" silently fails when there is a '/' in the context root.  It appears to just automatically fall back to using the server.xml.

Steps to reproduce:

1. Create a Tomcat 6 Server
2. Open server properties page and check "Publish module contexts..." box.
3. Create a new Dyamic Web Project
4. Right click->Properties->Web Project Settings
5. Set the Context root: to something with a '/' like "test/dude".
6. Deploy the dynamic web project to the server.
7. Examine the server.xml in the workspace's metadata directory: ".metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\server.xml"
8. Note the <Context/> element in the server.xml.
9. Note the lack of an xml file in conf/Catalina/localhost

Handling a '/' in a Tomcat context root is a little tricky.  The key is that you need to name the .war file or in this case the context.xml file correctly replacing all '/' with '#'.

Mike
Comment 1 Mike Youngstrom CLA 2011-04-11 23:11:01 EDT
FYI, I tested it with Indigo M6a and Tomcat 7.  Same behavior.  This issue may be higher priority with Tomcat 7 given this discussion I found:

http://www.eclipse.org/forums/index.php?&t=msg&goto=546672
Comment 2 Larry Isaacs CLA 2011-04-21 13:33:00 EDT
This has been fixed at HEAD and is present in the current WTP 3.3.0 build.
Comment 3 Eclipse Genie CLA 2017-10-11 16:36:06 EDT
New Gerrit change created: https://git.eclipse.org/r/109034