How to Get Generic Connection String in Java?

Posted on 2006-04-19
Medium Priority
Last Modified: 2010-03-31
Hi Experts,,
i m new in J2EE
before this i been working in .Net technology...
Well i have to make a web app....
in that have to connect to Oracle DB,
nowin .Net the Connection string was given in web.config...
and used every where else in application
and in future only web.config needed to be chnaged in case of any chnages in db connection

is this possible in Java if soo how can i do it...
i am using Sun Java Studio Create 2 as IDE....

Question by:noshi316
  • 3
LVL 30

Accepted Solution

Mayank S earned 150 total points
ID: 16487129
You can store the connection-string in a properties-file or any config XML file as you have in .NET, or store it as a data-source in the application's configuration-file.
LVL 30

Expert Comment

by:Mayank S
ID: 16487141
For MySql, this defines the steps:

LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 150 total points
ID: 16487159
Ok, found a page on Sun's web-site too. Better read this one:


Author Comment

ID: 16487163
okay i try the configuration file

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
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
Course of the Month12 days, 15 hours left to enroll

578 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