You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Patrick van Kann <pa...@fortune-cookie.com> on 2000/10/26 20:45:50 UTC
Including etc. database connection parameters in
a file
Hello,
I have been through the FAQ and archives to answer this question but I'm
afraid I'm stuck. Apologies if this seems like a daft question.
When using esql, you have to have in your xsp the following:
<esql:driver>com.inet.tds.TdsDriver</esql:driver>
<esql:dburl>jdbc:inetdae:10.1.8.104:1433?database=mydatabase</esql:dburl>
<esql:username>my username</esql:username>
<esql:password>my password</esql:password>
I'm going to use esql in lots of different pages, and I may want to change
these parameters down the track (when it goes to the live database server
for example!). So I want to include these parameters in an external file.
I have tried to use
<util:include-file parse="xml" name="dbconnection.xml"/>
where dbconnection.xml contains the above parameters...
Obviously, the xsp is processed before these get included so it doesn't work.
Can anyone explain how I could include the connection parameters in a file?
I'm using Cocoon 1.8 with JDK 1.3 and Tomcat 3.1. It all works just dandy
except for the include biz.
Thanks in advance.
Patrick
Re: Including etc. database connection parameters in
a file
Posted by Donald Ball <ba...@webslingerZ.com>.
On Thu, 26 Oct 2000, Patrick van Kann wrote:
> Hello,
> I have been through the FAQ and archives to answer this question but I'm
> afraid I'm stuck. Apologies if this seems like a daft question.
not a daft question, but answered many times over in the list already.
> When using esql, you have to have in your xsp the following:
>
> <esql:driver>com.inet.tds.TdsDriver</esql:driver>
> <esql:dburl>jdbc:inetdae:10.1.8.104:1433?database=mydatabase</esql:dburl>
> <esql:username>my username</esql:username>
> <esql:password>my password</esql:password>
>
> I'm going to use esql in lots of different pages, and I may want to change
> these parameters down the track (when it goes to the live database server
> for example!). So I want to include these parameters in an external file.
>
> I have tried to use
>
> <util:include-file parse="xml" name="dbconnection.xml"/>
>
> where dbconnection.xml contains the above parameters...
>
> Obviously, the xsp is processed before these get included so it doesn't work.
>
> Can anyone explain how I could include the connection parameters in a file?
1. external entities
2. xincludes
3. connection pooling
- donald