Thanks for clearing that up Craig, however I still have problems with the
unpackwars attrbiute.

If I put my Context details in the server.xml file and leave the un-exploded
war file in web apps, Tomcat starts up but throws an exception:
java.lang.IllegalArgumentException: Document base
K:\Extensions\jakarta-tomcat-4.1.12\webapps\reality does not exist or is not
a readable directory
        at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:19
3)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3397)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

And I have to explode the war manually before I start the server.

Why????????

My context:
<Context path="/reality" docBase="reality" debug="5" reloadable="true"
crossContext="true">...

My Host tag is as such:
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true">

I've tried setting the docBase to the war file, but the war isn't exploded
and it runs off the war file directly. This means, an XML file I use for
config in my WEB-INF folder is inaccessible. (Unless I move this now to the
classes folder and load it through a classloader, which means I can't edit
it, etc, etc...). I know, I know I shouldn't be writing to the web app but I
need to ;-)

If all comes to worse, I just move my config to the database instead.

Cheers,
Anthony

----- Original Message -----
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, December 16, 2002 12:01 PM
Subject: Re: context.xml inside war and outside


>
>
> On Mon, 16 Dec 2002, Anthony Ikeda wrote:
>
> > Date: Mon, 16 Dec 2002 11:08:51 +1100
> > From: Anthony Ikeda <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: context.xml inside war and outside
> >
> > I have moved my Context declarations from the server.xml file to a
> > META-INF/context.xml file in my war file.
>
> IIRC, that will only work if you use the "deploy" command of the manager
> webapp to deploy the app.  It's not recognized by the auto-deploy of WAR
> files in the "webapps" directory, or for contexts installed with the
> "install" command.
>
> Craig
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to