struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Petrelli" <antonio.petre...@gmail.com>
Subject Re: How to use <data-source> in your own java file?
Date Thu, 27 Mar 2008 08:23:59 GMT
2008/3/27, Chen Chunwei <out-chenchunwei@cn.panasonic.com>:
>  I've already configured a <data-source> in struts-config.xml through some reference.
But I don't know how to use it in my own business logic.

Use the "getDataSource" method in your action. Anyway, notice that it
is discouraged to use a data source this way. It is better to use JNDI
to take it from the container.

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message