Hi,
I have code a servlet that can connect to the database.
But I find my design not good enough.
The main reason is because the connection string is coded
inside. Should I change database or database instance,
I would need to change the code and recompile the source.
I'm thinking of putting the connection string in a text file
and have my servlets access this file and read it in.
This way all I need is to change the text file or initialization
file and my class file remains the same.
Does anyone have any snippets of code where I can learn how
to read from a file ?
Another area, is if I use a file for initilization purpose,
I will have lots of sections. Examples are section for connection string,
for constants (maybe) etc.
Whats the best way to use a text file for init. purpose.
Thanks
----------
Message To Spammers -- Game Over! Get spam-free email at http://www.MsgTo.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html