Sorry all,  I forgot to say please..

any help appreciated.

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

> -----Original Message-----
> From: Gare, Trefor [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday,3 April 2002 11:45
> To:   '[EMAIL PROTECTED]'
> Subject:      How to access initParameters in the dbtags library?
> 
> Hi all,
> 
> 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]>

Reply via email to