Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

self contained app  RSS feed

 
Shamunda Bero
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sure this doesn't fit in this section but until I'm further along in understanding java, j2ee, and things. I figured for me this would be the best place to start.

I'm trying to help our IT team with ideas in modifying our existing code. One problem I believe we have is that we have an application that uses .ears and .wars but rather than read from a single web.xml file, they read from a private config.properties file. The problem is that file is placed at the root of the application server (in my case tomcat), so that if I deploy another .war or .ear it will read the same config.properties file. I don't want that.

What I'm trying to achieve, is having the app self contained so that if I want it pointing to, say, a different database it will not read the private config.properties files, but read their own deployment descriptor files (web.xml i think). I'm not sure if I'm making that clear but that's about as close as I can describe it.

So my question is (and forgive me if I'm asking it the wrong way), is how I make it so that I'm reading the jdbc connection property from web.xml, rather than from config.properties?
Here's the snippet:



Any help would be much appreciated.

Thanks
 
Knute Snortum
Sheriff
Posts: 3545
85
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure where this should go either but let's try Web Services.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!