Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

using a Web.Config in java

Posted on 2009-07-09
12
Medium Priority
?
932 Views
Last Modified: 2012-05-07
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
Comment
Question by:noreenburke
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
12 Comments
 

Author Comment

by:noreenburke
ID: 24814649
FYI::: the db is oracle 10g
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24814667
0
 

Author Comment

by:noreenburke
ID: 24814820
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.

 
LVL 86

Accepted Solution

by:
CEHJ earned 750 total points
ID: 24814923
0
 

Author Comment

by:noreenburke
ID: 24817125
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 24817165
Properties is a class in the API. It usually works with a file in the application, stored anywhere, but often in the classpath
0
 
LVL 92

Expert Comment

by:objects
ID: 24819067
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
 

Author Closing Comment

by:noreenburke
ID: 31601656
thanks for you help
0
 
LVL 92

Expert Comment

by:objects
ID: 24844834
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 24844903
Is it for server side configuration?
0
 
LVL 92

Expert Comment

by:objects
ID: 24844909
thats not even relevant
0
 

Author Comment

by:noreenburke
ID: 24848352
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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question