• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

self contained app

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure where this should go either but let's try Web Services.
 
If you send is by car it's a shipment, but if by ship it's cargo. This tiny ad told me:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic