I'm in the middle of trying to deploy IIS + Tomcat, and its' a mess. The company has a ton of virtuals set up in IIS, and because there are so many and some of the virtuals contain JSPs, we need Tomcat running all of these virtuals.

I've attempted to setup the Host/Context as follows:

<Host name="localhost" unpackWARs="true" autoDeploy="false" appBase="e:\webdata\Inetpub\wwwroot\">
    <Context path="/aboriginal"  docbase="static\business\Abo"   crossContext="true" />
    <Context path="/ecc"  docbase="static\countries\Canada\ECC"   crossContext="true" />

The problem is, when tomcat loads it looks for "e:\webdata\inetpub\wwwroot" to exist.

SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base e:\webdata\Inetpub\wwwroot\ecc does not exist or is not a readable directory

And of course it doesn't exist! static/business/Abo exists!

Everything I read lead me to believe the "contexts" were Tomcat's version of virtual folder. Why does the virtual folder have to exist priori to creating it?

Is this the way it is? What am missing here?

I've written an IronPython script to pull the virtuals from IIS and create the appropriate IIS config. I would prefer not having to create a series of empty files and folders to replicate this.

Thanks a million for any help!

  • You can remove the appBase from server.xml and specify the full path to the web app in docBase docBase="e:\actual_file_path\static\business\Abo" – JoseK Nov 3 '10 at 8:21
  • Would that get away from the problem I'm seeing here? – user59016 Nov 3 '10 at 14:19

JoseK is right.

Please see the docbase property here: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Common_Attributes

You should therefore have

<Context path="/ecc" docbase="e:\webdata\Inetpub\wwwroot\static\countries\Canada\ECC" crossContext="true" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.