Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Beans and access to web.xml

Status
Not open for further replies.

sleepingSatellite

Programmer
May 13, 2002
20
0
0
DE
I have a JSP application. JSP must get data from a DB. The access to DB is performed through a bean, which instantiates the connection and execute the queries.

The problem is that in order to access the DB, I need user and password, and I want these to be stored in web.xml (I use Tomcat).
Does it mean that everytime The JSP needs to access the DB it must pass to the bean the application object so that the bean can access web.xml, get the password and access the DB ?

CAN'T THE BEAN ACCESS DIRECTLY WEB.XML ? CAN'T I AVOID TO PASS application TO THE BEAN EVERYTIME ?

Thank you.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top