Web.xml extract
<!-- Application Initialization Servlet -->
<servlet>
<servlet-name>applicationInitialisation</servlet-name>
<servlet-class>Blah.ApplicationInitServlet</servlet-class>
<load-on-startup>3</load-on-startup>
</servlet>
I wish to load information into an arraylist of beans
for use in <html:select>, the data comes from
database.
I need to know how to get access to the datasource in
a standard servlet.
I've tried extending my class from ActionServlet, but
the datasource keeps returning null.
see below:
ServletContext sc = getServletContext( );
DataSource ds = findDataSource( null );
try {
SecurityModuleSql sql = new SecurityModuleSql( ds );
sc.setAttribute(key, sql.getDropDown( ) );
}
Cheers Dave
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>