I am trying to figure out how to dynamically add persistent virtual
hosts or context paths within a host to tomcat(6/7) without using the
(host-)manager. The official tomcat docs warns against using context
containers inside the "<Host> tags" in the server.xml but I cannot get
it working otherwise. The example below is what I'm trying to do.
My Context Path Example:
---------------------------------------
When I create the following file
"$CATALINA_HOME/conf/Catalina/localhost/docs.xml" with the following
content (next 2 lines):
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/docs" docBase="/usr/share/tomcat7-docs/docs"
antiResourceLocking="false" />
This resource localhost/docs is never loaded even if I try to restart
the tomcat service. The manager frontend does not pick it up either.
The static solution is usually what I resort to:
Static Solution:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="false" deployOnStartup="false"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="/docs" docBase="/usr/share/tomcat7-admin/manager"
antiResourceLocking="false" />
</Host>
The same goes for virtual hosts where I create the file
$CATALINA_HOME/conf/Catalina/dev.example.com/ROOT.xml the static
solution for the virtual host as shown below:
<Host name="dev.example.com" appBase="webapps"
unpackWARs="false" autoDeploy="false" deployOnStartup="false"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="example-dev" />
</Host>
I have tried working with tomcat 7.0.19 and 6.0.24. I am very
frustrated, hoping that someone could shed some light on the matter.
Regards,
Mell Ozor
> --
> You received this message because you are subscribed to the Google Groups "CTJUG Forum" group.
> To post to this group, send email to CTJUG...@googlegroups.com
> To unsubscribe from this group, send email to CTJUG-Forum...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
> For the ctjug home page see http://www.ctjug.org.za
> For jobs see http://jobs.gamatam.com/
--
Brian Silberbauer Software Consulting
+27 (0)83 566 2705
http://www.gamatam.com/
jobs site: http://jobs.gamatam.com/
--
You received this message because you are subscribed to the Google Groups "CTJUG Forum" group.
To post to this group, send email to CTJUG...@googlegroups.com
To unsubscribe from this group, send email to CTJUG-Forum...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
For jobs see http://jobs.gamatam.com/
