Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Re: How to make Server/Tomcat pick up dynamic properties file in WEB-INF/classes
Re: How to make Server/Tomcat pick up dynamic properties file in WEB-INF/classes [message #223308] Fri, 31 October 2008 09:13 Go to next message
Eclipse User
Originally posted by: eclipse-news.rizzoweb.com

I'm copying this thread to the eclipse.webtools newsgroup where it might
get more attention.

On 10/30/2008 8:17 PM, Jan Yan wrote:
> Hello,
>
> We have a set of properties files. They are different according to
> various environment, e.g. DEV, QA, and PROD. I have run the Ant build
> script to drop a specific property file to WEB-INF/classes (the output
> folder). Then I start Server/Tomcat. Tomcat kept not getting this
> property file. Please note that this property file is not in the source
> folder (src). If it is in the source folder, Tomcat picks it up just
> fine. However, it's not ideal solution for me because I would like these
> dynamic properties file only stay in the classes folder. Is there any
> way to make Server/Tomcat pick up whatever in the WEB-INF/classes?
>
> Thank you very much.
>
Re: How to make Server/Tomcat pick up dynamic properties file in WEB-INF/classes [message #223314 is a reply to message #223308] Fri, 31 October 2008 09:59 Go to previous message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1305
Registered: July 2009
Senior Member
Eric Rizzo wrote:
> I'm copying this thread to the eclipse.webtools newsgroup where it might
> get more attention.
>
> On 10/30/2008 8:17 PM, Jan Yan wrote:
>> Hello,
>>
>> We have a set of properties files. They are different according to
>> various environment, e.g. DEV, QA, and PROD. I have run the Ant build
>> script to drop a specific property file to WEB-INF/classes (the output
>> folder). Then I start Server/Tomcat. Tomcat kept not getting this
>> property file. Please note that this property file is not in the source
>> folder (src). If it is in the source folder, Tomcat picks it up just
>> fine. However, it's not ideal solution for me because I would like these
>> dynamic properties file only stay in the classes folder. Is there any
>> way to make Server/Tomcat pick up whatever in the WEB-INF/classes?
>>
>> Thank you very much.
>>
>

If the copy is going to the Java source folder's output directory
(typically "build/classes") then it should be copied during publishing.
At least this works for me. You will need to make sure the file is
recreated whenever the project is rebuilt.

Cheers,
Larry
Previous Topic:What to specify for "servlet" in the web.xml for a web service: The Implementation or Inte
Next Topic:Creating a Server Type That is Associated with One Project at a Time
Goto Forum:
  


Current Time: Sat Aug 23 01:47:42 EDT 2014

Powered by FUDForum. Page generated in 0.01553 seconds