Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Tomcat context path via META-INF/context.xml

843841Nov 14 2006 — edited Apr 8 2008
Am incorrectly assuming the use of a context.xml file located withing a war file's META-INF directory for deployment within Tomcat 5.5?

I currently have an extremely simple context.xml file in my war (foo-1.0.war), containing the following:

<?xml version="1.0" encoding="UTF-8"?>
<Context path="/foo" />

I was under the impression that when deployed within tomcat, my context path would be set as "/foo". The issue I am having is that the context is still the deployed WAR file's name (/foo-1.0).

I am looking for the easiest path for our operations people to handle deployment. So, I thought I would toss a context.xml file in there (foo-1.0.war#/META-INF/context.xml) and call it a day. I see that the file actually gets extracted and placed into the ${catalina.home}/conf/Catalina/localhost directory, with the name "foo-1.0.xml" (which is where I can see how Tomcat is getting the context name). The contents of the file are exactly what is in the original context.xml file.

So, am I missing a step? Is there another configuration I need to set up to get these context files to be able to declare the context path (wow, that is a lot of "to")?

Thanks,

Briggs.

Comments

Dave Schleis
Answer

Hello Sangeeta,
The dmd file is a small XML file that contains a reference to the folder that contains the actual design files. So, when copying a SQL Developer Data Modeler design, you must copy both the dmd file and the associated folder.
Hope this helps.
--dave

Marked as Answer by Sangeeta Pandey · Jan 13 2021
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 6 2008
Added on Nov 14 2006
8 comments
2,166 views