Hi,
Sorry if I'm being a bit dense, but could I check if I'm understanding
correctly? I can't get it working with your suggestions.
On 18/04/2012 0:04, Konstantin Kolinko wrote:
2012/4/17 ron.vandenbranden@home<ron.vandenbran...@kantl.be>:
2. change ${CATALINA.HOME}/conf/server.xml as follows:
<Host name="localhost" appBase="webapps" unpackWARs="true"
autoDeploy="false" deployOnStartup="false">
<Context path="/apps/my_app" docBase="/my_app/" reloadable="true"/>
</Host>
More comment on the above, as you have already read the docs.
Putting<Context> element into server.xml is considered a bad practice.
Instead of that you'd put it into separate XML file,
conf/Catalina/localhost/apps#my_app.xml
as
<Context docBase="/docbase/of/my_app/" />
That "reloadable="true"" is not really needed.
Your docbase can be anywhere (outside of webapps directory) and need
not have the '#' sign in it.
The working folder for your app will still be
${catalina.base}/Catalina/localhost/apps#myapp with a hash char in it,
but I think that will work with Cocoon.
I have my webapps located at F:\tomcatApps (so outside of the catalina
tree), where 'my_app' lives in a folder named 'apps#my_app'. So I'm
specifying this in ${catalina.base}/conf/server.xml:
<Host name="localhost" appBase="F:/tomcatApps" unpackWARs="true" autoDeploy="false"
deployOnStartup="false">
...without any further <Context> elements.
Next, I create following file at
${catalina.base}/conf/Catalina/localhost/apps#my_app:
<Context docBase="/my_app/" />
(as I understand from the docs that the @docbase value must be relative
to the Host's @appBase).
When I start Tomcat with these settings, no webapps are deployed at all.
I tried toggling the values for @autoDeploy and @deployOnStartup, and
only the latter seems to make any webapps to be deployed. Yet, the
Tomcat console window then logs following message:
INFO: Deploying configuration descriptor
F:\tomcat-7.0.27\conf\Catalina\localhost\apps#my_app
18-apr-2012 0:37:56 org.apache.catalina.startup.HostConfig deployDescriptor
WARNING: A docBase F:\tomcatApps\my_app inside the Host appBase has been
specified, and will be ignored
Eventually, the 'my_app' app is deployed, but with the same result:
Cocoon chokes on the hash in the folder name.
BTW, I wonder how Cocoon behaves if your application is in a war file
and you run with<Host unpackWARs="false" />
Hmm, I could give that a try (tomorrow, perhaps, off to bed now), though
I recall some issues with Cocoon-based web apps that needed a physical
directory structure.
Again, many thanks for your help!
Kind regards,
Ron
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org