> From: jo...@centrum.cz [mailto:jo...@centrum.cz] 
> Subject: How to setup webapp specific parameter for virtual host in Tomcat?

> <Host name="my.domain.com" appBase="vhosts/my.domain.com" 
>       unpackWARs="true" autoDeploy="true">
> <Context docBase="/" reloadable="true">
> <Parameter name="serverRole" value="dev" override="true"/>
> </Context>
> </Host>

The docBase is incorrect, and the path is missing.  However, you really 
shouldn't be putting <Context> elements in server.xml, so the point is moot.

> app is no more accessible by my.domain.com (404)

Expected, given the invalid <Context> settings.

> I also tried to move the Context from Host to separate 
> ROOT.xml file residing in 
> $CATALINA_BASE/conf/Catalina/my.domain.com/ but with no 
> success

Unlikely that Tomcat reports the error message "no success"; exactly what error 
are you getting with what URL?

Did you check the logs for deployment errors?

> Actually I don't know what to set for path or docBase, but 
> it seems that I am lost.

You must omit path (it's not allowed here).  You must also not specify docBase 
if the webapp is located within the <Host> appBase - as yours appears to be.

Post your ROOT.xml from conf/Catalina/my.domain.com and your current 
conf/server.xml (but please remove the comments first to save space).

 - Chuck

 
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

Reply via email to