Thanks Anuj,

I'll give that a shot.  Re: the why don't you use the JSTL library.. it's a
case of ignorance on my part I'm afraid.  However on my quick investigations
this morning it still seems to be in beta and not advised for production
systems which is what we're building at the moment.  It also requires a
JSP1.2 container and we're also working with Tomcat 3.3 which isn't JSP1.2
compliant.

As such we don't seem to be quite ready for each other just yet.  Let me
know if I've got the wrong end of the stick though, as I'm a newbie in this
corner.

Cheers

Tref Gare
Web Developer MCSD/SCJP
eCommerce Group
Phone:  (03) 9221 4106
Mobile: 0409 556 478
Fax:    (03) 9941 4295

> -----Original Message-----
> From: Agrawal, Anuj (Anuj)** CTR ** [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday,3 April 2002 8:36
> To:   'Tag Libraries Users List'
> Subject:      RE: How to access initParameters in the dbtags library?
> 
> That's strange, i had tried setting them as context-param and it appeared
> to
> work fine for me.  Note the context-param tag(s) go directly under the
> web-app tag.  You may want to drop the init-param tag.
> 
>       <web-app>
>       <context-param>
>               <param-name>dbUrl</param-name>
>               <param-value>jdbc:odbc:deved</param-value>
>       </context-param>
>       <context-param>
>               <param-name>dbDriver</param-name>
>               <param-value>sun.jdbc.odbc.JdbcOdbcDriver</param-value>
>       </context-param>
> 
> Also - i'm always curious to know why folks are preferring to use the
> DBTags
> lib over the SQL actions within JSTL?  I had used DBTags before JSTL RI
> was
> "released", and find it A LOT MORE flexible and "user-friendly".  (This is
> not to say that the DBTags team did not do a good job; it's just that JSTL
> has really improved on it. 8) )
> 
> > Second day on custom tags and I'm having trouble accessing 
> > something the
> > docs say I should be able to.
> > I'm using the jakarta dbtags library and attempting to set 
> > the database url,
> > driver, userId and password in the web.xml as initParameters 
> > as the docs
> > suggest is possible.
> > However I can't locate where what or how these initParameters 
> > are set.  They
> > don't seem to be normal context-params.. can anybody set me straight?
> > The taglib itself is working fine, I just would rather store 
> > these params
> > somewhere central.
> > 
> > I'm using Tomcat 3.3 and the relevant bits of m web.xml 
> > currently looks like
> > this:
> > 
> >   <taglib>
> >     <taglib-uri>http://jakarta.apache.org/taglibs/dbtags</taglib-uri>
> >     <taglib-location>/WEB-INF/dbtags.tld</taglib-location>
> >   </taglib>
> >   <taglib>
> >     <taglib-uri>/dbtags</taglib-uri>
> >     <taglib-location>/WEB-INF/lib/dbtags.jar</taglib-location>
> >   </taglib>
> > 
> >   <context-param>
> >     <init-param>
> >         <param-name>dbURL</param-name>
> >         <param-value>jdbc:twtds:sqlserver://blah/blah</param-value>
> >         <description>blah blah </description>
> >     </init-param>
> >  </context-param>
> > 
> > 
> > 
> > 
> > ************************************************************
> > and the DBtags docs suggest I should be able to do this:
> > *****************************************
> > Instead of including your database URL, driver name, user id, 
> > or password
> > inside your tag body, you may optionally use the 
> > "initParameter" attribute:
> > <%-- store your connection info in the web.xml file --%>
> > <sql:connection id="conn1">
> >   <sql:url initParameter="dbURL"/> 
> >   <sql:driver initParameter="mysqlDriver"/>
> >   <sql:userId initParameter="dbUserId"/> 
> >   <sql:password initParameter="dbPassword"/>
> > </sql:connection>
> > 
> > 
> > Tref Gare
> > Web Developer MCSD/SCJP
> > eCommerce Group
> > Phone:      (03) 9221 4106
> > Mobile:     0409 556 478
> > Fax:        (03) 9941 4295
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: 
> > <mailto:[EMAIL PROTECTED]>
> > 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

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

Reply via email to