If you give the bean "application" scope on the JSP page it will be stored in and retrieved from the ServletContext associated with this "application" - so
 
<jsp:useBean id="appBean" class="com.appbean" scope="application" />
 
Kevin
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Ralf Riedel
Sent: 14 July 1999 20:51
To: [EMAIL PROTECTED]
Subject: how to access application bean data

Hi there,

I'd like to access data I've stored in an application bean from within an other beans code. The application bean manages a pool of db connections, from which other beans may want to grab one to get able to access the database. Now, the only way I know to access the application bean later is from a servlet through the ServletContext. So my question: Is there a way the get on the data stored in the application bean without using servlets, e.g. directly from the code of the bean which needs database access?

many thanks,
ralf


-----------------------------------------------------------------
 Ralf Riedel                          [EMAIL PROTECTED]
 Multimedia Software GmbH Dresden          Tel. +49 351 8505 827
 Tele-Applications and Services            Fax. +49 351 8505 888
 
 We're back to the times where men were men and wrote their own
 device drivers - Linus Thorvalds
 

Reply via email to