Link to home
Start Free TrialLog in
Avatar of noreenburke
noreenburke

asked on

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
Avatar of noreenburke
noreenburke

ASKER

FYI::: the db is oracle 10g
Avatar of CEHJ
where does the properties file exist in the application?  

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

Thanks
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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?
Properties is a class in the API. It usually works with a file in the application, stored anywhere, but often in the classpath
you should define your database as a data source and specify the connection details in your apps context file and access it via jndi
thanks for you help
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 :)
Is it for server side configuration?
thats not even relevant
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.