You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by STEINER Stephan <St...@nextiraone.ch> on 2006/03/07 15:46:58 UTC

RE: Using a configuration file without path for an application deployed on tomcat

Nick 

Thanks for the suggestion. It's a bit problematic though since that config file needs to be edited by our clients and we obviously won't give out the source code so that they can rebuild the jar. Since a jar is just an archive, wouldn't it be possible to actually open that archive and just edit the file?

I guess I got some reading up to do on the whole resource stream thing and while I'm at it property files as well since they're new to me..

Regards
Stephan 

-----Original Message-----
From: Duan, Nick [mailto:NDuan@mcdonaldbradley.com] 
Sent: Montag, 6. März 2006 19:08
To: Tomcat Users List
Subject: RE: Using a configuration file without path for an application deployed on tomcat

How about packaging the config.xml file within the jar file and import it to your application via resource stream? See
Class.getResourceAsStream() or ClassLoader.getResourceAsStream() for more details.

The limitation of this approach is that the configuration parameters have to be predefined prior to deployment.

ND

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