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?

Improve company productivity with a Business Account.Sign Up

x
 
noreenburkeAuthor Commented:
FYI::: the db is oracle 10g
0
 
CEHJCommented:
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
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
 
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
 
objectsCommented:
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
 
objectsCommented:
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
 
objectsCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.