Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 935
  • Last Modified:

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
0
noreenburke
Asked:
noreenburke
  • 5
  • 4
  • 3
1 Solution
 
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 5
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now