well, just read the text file ;-)
However, you might want to store more than just the database name. Maybe you
also want to put other connection parameters like userid, servername,
password there. Or parameters for several databases.
In that case consider using a Properties object. This has methods (store and
load I think) that read and write all the properties to a file in an INI
file format.

Geert Van Damme

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Ritu Kama
> Sent: vrijdag 28 juli 2000 9:19
> To: [EMAIL PROTECTED]
> Subject: Can I read a text file thru a bean
>
>
> Hi all,
>
> My requirement is as follows:
>
> I have a initialization file containing the database name.
> Thru my bean I want to read the DB name and establish connection with that
> particular database. I don't want to hardcode the db name.
>
> Please suggest how to achieve this.
>
> Thanks
> Ritu
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to