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
If there a similar thing that can be used in the Java world to store connection strings without having to recompile the application?
thanks
ASKER
where does the properties file exist in the application?
can you give a sample of a connection string inside this file?
Thanks
can you give a sample of a connection string inside this file?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?
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
ASKER
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
ASKER
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.
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.
ASKER