using a Web.Config in java

In asp and vb world I used a web.config file to store db connection strings and other common stuff.

If there a similar thing that can be used in the Java world to store connection strings without having to recompile the application?  

thanks
noreenburkeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

noreenburkeAuthor Commented:
FYI::: the db is oracle 10g
0
CEHJCommented:
0
noreenburkeAuthor Commented:
where does the properties file exist in the application?  

can you give a sample of a connection string inside this file?

Thanks
0
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
noreenburkeAuthor Commented:
Boy, I just don't think my brain is working today.

is a Properties file a Bean? servlet? xml? txt?  and where would it be stored in the application?
0
CEHJCommented:
Properties is a class in the API. It usually works with a file in the application, stored anywhere, but often in the classpath
0
Mick BarryJava DeveloperCommented:
you should define your database as a data source and specify the connection details in your apps context file and access it via jndi
0
noreenburkeAuthor Commented:
thanks for you help
0
Mick BarryJava DeveloperCommented:
For others reading this the accepted solution is completely unnecessary, there is already a standard method for providing connection details. Nobody doing Java web development uses a separate properties file to store these details :)
0
CEHJCommented:
Is it for server side configuration?
0
Mick BarryJava DeveloperCommented:
thats not even relevant
0
noreenburkeAuthor Commented:
So what is the standard method.?
I gave the point the to cehj as he did give me some pointers.  I actually am defining the string in a bean and then calling that.

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.