Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
    
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

1 Answer 1

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" />

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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