How to Get Generic Connection String in Java?

Posted on 2006-04-19
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
    LVL 30

    Accepted Solution

    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

    For MySql, this defines the steps:
    LVL 30

    Assisted Solution

    Ok, found a page on Sun's web-site too. Better read this one:
    LVL 1

    Author Comment

    okay i try the configuration file

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
    The viewer will learn how to implement Singleton Design Pattern in Java.

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now