Hmm.. .That's not even close to accurate.
Daniel is using a Context Configuration File which may contain a <Context
... > element and make it so you don't have to modify the server.xml. As
far as the unwarring, Tomcat actualy will "not* automatically expand
webapps which have a defined context element. This is by design although
some might consider it a bug.
There are 3 solutions:
1. in the <Context ...> element, point directly to the .war file as the docBase
2. expand the .war file yourself before starting Tomcat and point to the
expanded directory in the docBase
3. Don't put your app inside $TOMCAT_HOME/webapps and use the install or
deploy task to dynamically deploy your app. This can be done through the
ant tasks using something like....
<install
url="${manager.url}"
username="${manager.username}"
password="${manager.password}"
path="${app.path}"
war="file://${build.home}/WEB-INF/myapp.xml" />
myapp.xml would have a <Context .... docBase="../"> or something like that
pointing to the base of the webapp. Note that I have *not* gotten this to
work on Windows. Craig R. McClanahan says it works for him on Linux. This
is the ideal solution, so if it works for you, I would use this one....and
if you get it to work on Windows, please tell me which version of Tomcat
you succeeded on and describe what you did to make it work.
later,
Jake
At 06:29 PM 8/31/2002 -0700, you wrote:
>Daniel,
>
>Tomcat will unjar (unwar?) the archived file by default. The <Context> entry
>should be in $CATALINA_HOME/lib/server.xml
>
>Garrett
>
>
>--- Daniel Kehoe <[EMAIL PROTECTED]> wrote:
> > Using TC4.1.9beta, I've got a myapp.war file (and matching myapp.xml
> > configuration file) I install successfully using the Tomcat Web
> > Application Manager. When I put the myapp.war and myapp.xml files in
> > <tomcat>/webapps and restart Tomcat (for permanent deployment) I get
> > the message:
> >
> > Error initializing resources: Document base
> > C:\java\tomcat4\webapps\myapp does not exist or is not a readable
> > directory
> >
> > The myapp.xml file contains:
> > <Context path="/myapp" docBase="myapp"
> > debug="5" reloadable="true" crossContext="true">
> > (plus it specifies a dataSource as a resource)
> >
> > I know the docbase doesn't yet exist when Tomcat starts because the war
> > file hasn't been unarchived. How is this supposed to work? Is there an
> > alternative to specifying the docbase? Do I have to manually unarchive
> > the war file? It was easy with other apps in TC3.2, I just dropped war
> > files into webapps and they deployed without any complaints. Maybe I've
> > overlooked a configuration parameter?
> > --
> > Daniel
> > [EMAIL PROTECTED]
> >
> > --
> > To unsubscribe,
> e-mail: <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
>=====
>http://dhtmlkitchen.com/
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Finance - Get real-time stock quotes
>http://finance.yahoo.com
>
>--
>To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>