Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

How to configure context.xml in tomcat/config

 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am using Tomcat 5.5.9

To get this code working in servlet for cross-context communication

ServletContext currentContext = getServletContext();
ServletContext futureContext = currentContext.getContext("/TestOne");

am supposed to make certain configuration changes in tomcat
Refer: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

And this is what I did in context.xml

<Context path="/SessionExample" docBase="E:\tomcat\webapps\SessionExample"
crossContext="true" debug="0" reloadable="true" privileged="true">
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>

<Context path="/TestOne" docBase="E:\tomcat\webapps\TestOne"
crossContext="true" debug="0" reloadable="true" privileged="true">
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>


where SessionExample is current context and TestOne is my second context.

But I am getting error when I startup tomcat server.

SEVERE: Parse error in default web.xml
org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic