You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paul Idusogie <po...@att.net> on 2002/11/16 23:03:47 UTC

Utilizing the Struts DataSource from a listener

Hello:

I am attempting to write information to a database using a connection
obtained through a dataSource.
Could anyone provide the best approach to write to a database from a session
listener.

I have attempted retrieving the datasource from the servlet context using
the following code snippet within my session listener

	DataSource dataSource = (DataSource)
servletContext.getAttribute(Action.DATA_SOURCE_KEY);

	listener cannot find the dataSource stored in the context.

Help!

Sincerely,


Paul Idusogie

Email: poidusogie@att.net


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>