How to configure embedded Tomcat? [message #635009] |
Mon, 25 October 2010 08:10  |
Eclipse User |
|
|
|
Hi all,
Is it possible to override the default web.xml which is included in the org.eclipse.gemini.web.tomcat bundle? Background of this problem is: I have a web bundle, which is deployed in Virgo. In the web.xml in this bundle, only some servlets and filters are registered. Per Virgo installation, we would like to configure things like session timeout. From the documentation (User guide, chapter 11.3) I understood this is possible to put 'Individual web applications' context configuration files' into the $SERVER_HOME/config/[enginename]/[hostname] directory.
A little unsure about how the files should be named, I created a file <server_home>/config/Catalina/localhost/web.xml, containing a copy of the defaults. This file seems to be ignored. Tried to enable some logging, but without success (is the logging eaten by the NOP SLF4J implementation?). Then I used the Process Monitor to find out which files are read, and found out it is trying to read <server_home>/conf/Catalina/localhost. A web.xml file put in here is picked up, but it creates a context named /context, but get errors printed to sysout and my configured session-timeout is ignored.
Now my question is: how should this mechanism work? Where can I put my own configuration files? Will they override the default configurations, or are they merged? It is an idea to ship (commented out) defaults with Virgo, so it is more clear what can be configured?
|
|
|
|
Re: How to configure embedded Tomcat? [message #635254 is a reply to message #635009] |
Tue, 26 October 2010 04:06   |
Eclipse User |
|
|
|
Hi,
the point is, I cannot specify settings in the web bundle, because it is delivered to multiple customers. Some have their own requirements related to session-timeout, so for them I would like to be able to customize the web.xml. From the documentation, I read the following:
Quote: |
Virgo Web Server supports standard Apache Tomcat web application context configuration. The Apache Tomcat Configuration Reference has a section on The Context Container which describes the mechanism that is used in VWS for searching context configuration files and details the context configuration properties.
The configuration files are located as follows:
$SERVER_HOME/config/context.xml is the default context configuration file for all web applications.
The $SERVER_HOME/config/[enginename]/[hostname] directory contains:
The default context configuration for all web applications of a given virtual host.
Individual web applications' context configuration files.
[enginename] is the name of Tomcat's engine ('Catalina' by default) and [hostname] names a virtual host, both of which are configured in tomcat-server.xml.
|
For me, it is a little bit vague what is meant by 'Individual web applications context configuration files', is it just what is mentioned in the context container section of the Tomcat documentation, or does it also include a application or server specific web.xml?
grtz,
Daniël
|
|
|
Re: How to configure embedded Tomcat? [message #635418 is a reply to message #635254] |
Tue, 26 October 2010 13:34  |
Eclipse User |
|
|
|
Hi,
The section, that you quoted, handles only the context container section of the Tomcat documentation. The Virgo user documentation will be updated in a way to be more precise about different web apps configurations (the standard one - in web.xml and the Tomcat's - in context.xml).
So my recommendation is to customize the session-timeout directly either in the web app bundle (local web.xml) or in the org.eclipse.gemini.web.tomcat bundle (global web.xml)
Regards
Violeta
|
|
|
Powered by
FUDForum. Page generated in 0.05194 seconds