This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Dear Ranchers, I'm doing a project in JSP and MySQL. For the JSP-MySQL connection , I'm now writing the connection statments in each and every time when I want to insert,delete, update of select the database queries. If I change the MySQL root password, it will affect the coding completely.. So Instead of that I want to put properties file to store the
MySQL database Username Password
Please help me by sending some links where I can read and master about Properties file.
I'm now writing the connection statements in each and every time when I want to insert, delete, update or select
I bet that's getting old, isn't it? One good guideline in OO design is to avoid duplication, which among other things means any copy paste is suspect. Are you comfortable making your own new classes? Think about a little class that does the connection work for you. It can read the configuration once, and remember it all day long.
If that much sounds worth doing, show us what you make and we'll talk about adding more nifty features.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi