Note: These tags are very easy to use with the Struts connection pool.
Simply give your datasource a "key" property in your Struts-config file,
and use the same key with the JDBC connection tag.
<data-sources>
<data-source
driverClass="org.gjt.mm.mysql.Driver"
maxCount="4"
minCount="2"
password=""
url="jdbc:mysql://localhost/test"
user="test"
key="DATASOURCE"
/>
</data-sources>
and in your JSP
<sql:connection id="cn1" dataSource="DATASOURCE"></sql:connection>
Viola! That's it!
(Or, if you're a purist, omit the key property and use:
<sql:connection id="cn1"
dataSource="<%=org.apache.struts.action.Action.DATA_SOURCE_KEY%>">
</sql:connection>
whew!)
-------- Original Message --------
From: Morgan Delagrange <[EMAIL PROTECTED]>
Subject: [ANNOUNCE] JDBC tag library released
To: taglibs-dev <[EMAIL PROTECTED]>,taglibs-user
<[EMAIL PROTECTED]>
Taglibs is proud to announce the release of the JDBC
tag library! For full details, visit the site:
http://jakarta.apache.org/taglibs/doc/jdbc-doc/intro.html
The JDBC tag library is designed for reading from and
writing to databases. Features include:
- Seamless support for multiple databases
- Obtaining connections from Drivers,
DataSources, and JNDI DataSources
- Support for Statements and PreparedStatements
- Automatic looping of ResultSets
- And so much more!
Thanks to Rich Catlett, Glenn Nielsen, and most
especially Marius Scurtescu for their invaluable
contributions.
- Morgan Delagrange
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/