On Sat, 2 Mar 2002, Agrawal, Anuj (Anuj)** CTR ** wrote:

> In the documentation for JSTL SQL tags
> (http://jakarta.apache.org/taglibs/doc/standard-doc/standard-ea3/DB_Function
> alDescription_1_EA3.html), it indicates that "the <sql:driver> action
> is only intended for prototyping and simple applications".
> 
> Is the "better" way to use DataSource object?  If so, how do we do
> this?  

Yes.  In fact, you're using DataSource objects no matter what you
do; <sql:driver> simply serves to expose a DataSource.  For applications
that aren't prototypes or relatively small, you can manage DataSource
objects in back-end code and simply expose them to your JSTL pages.

> Also, if i'm using the <sql:driver> action, is there a way for the url
> and driver to be read from <context-param> in WEB-INF\web.xml?  The
> DBtaglib provides for this capability, but how can we do it using
> JSTL?

<sql:driver> reads from context parameters by default.  The parameters for
URL and driver, respectively, are

 javax.servlet.jsp.jstl.sql.driver

and

 javax.servlet.jsp.jstl.sql.url

--
Shawn Bayern
Author, "JSP Standard Tag Library"  http://www.jstlbook.com
(coming this spring from Manning Publications)



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to