tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: WEB-INF/classes vs WEB-INF/lib/classes.jar file
Date Thu, 05 Feb 2009 12:07:06 GMT
Mikolaj Rydzewski wrote:
> André Warnier wrote:
>> if I have a webapp consistig of just a couple of classes and a 
>> WEB-INF/web.xml config file, but this web.xml file contains some 
>> parameters that are "each-client-dependent", and some customers are 
>> insisting to receive the updates as a war file, how can I achieve that ?
>>
>> Someone earlier here mentioned that you could put the settings in a 
>> file outside the application, but that is not possible in this case, 
>> or is it ?
> You can have web.xml parameter, e.g.
> 
> <context-param>
>    <param-name>config-file-location</param-name>
>    <param-value>/filesystem/path or URL or 
> some-other-location</param-value>
> </context-param>
> 
> And then you can retrieve parameter value, thus, read config file.
> Idea is, that param-value is the same for every client/build. E.g. 
> points to configuration file in $CATALINA_HOME/conf. So you can have one 
> war file and client dependant configurations.
> 
> 
Ok, that would work if you wrote the webapp yourself, and all the 
filters that go with it.  It would however not work if there are some 
customer-specific parameters in web.xml, that are outside of your 
control. (I'm thinking for example of a UrlRewrite or jCIFS filter)

Would there be a way to create a war file that does not contain a 
WEB-INF/web.xml file, but maybe contains a "soft link" to a whole 
web.xml file located somewhere else ?

The basic idea is : I could still give my customer a war-file that he 
can deploy containing my updated classes of jars or whatever, but it 
would not overwrite his customer-specific web.xml when he deploys it.

I think this issue is so general/generic that there must exist some way, 
no ?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message