tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Collins" <>
Subject RE: Repeat: Can Tomcat be used with non-webapps?
Date Mon, 14 Jun 2004 20:12:46 GMT
-----Original Message-----
For tomcat 5:
In your <apachedir>/conf/Catalina/localhost/ directory add a
<contextname>.xml file  with the following contents:

<Context path="" docBase="<doc root on your hd>" >
          <Logger className="org.apache.catalina.logger.FileLogger"
                prefix="localhost_log." suffix=".txt"

Thank you for your response, Dave, and I apologize for not specifying
ahead of time which version of Tomcat I am using(5.0.24)

Unfortunately I am still a little confused.  How is my application
supposed to know to specifically use context <contextname>?  In the
tests I've done after reading your e-mail and following its
instructions, the context being initialized still has name "", and
naturally it fails to look up a data source when told to do so.  I've
tried my best to boil this down into the few most-relevant questions
that I can think of:

1. Should Tomcat automatically know to use the context I just created
based only on the empty path that I supplied in its XML file?  Do I have
to explicitly specify somewhere that my application should use this
particular context?

2. Does it matter what I choose for <contextname>?  Does it have to be
the name of the application?

3. Should I add the context's associated datasource(<resource.../>) in
<contextname>.xml or somewhere in server.xml (or somewhere else)?

Again, all responses are greatly appreciated,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message