You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Francisco Mesa Villlalba <fr...@juntadeandalucia.es> on 2003/04/23 08:02:22 UTC
DataSource && JSLT
Is there a way to use a DataSource located in the JNDI enviroment with the
sql tags?
The sql:setdatasource tag requires url + driver + user + password, but I
don't want to provide such information in every page, I wan´t to configure
my DataSources in the server configuration in the same way I do for common
JDBC access.
Thanks in advance,
Francisco
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
RE: DataSource && JSLT
Posted by Francisco Mesa Villlalba <fr...@juntadeandalucia.es>.
Thanks Henri, it works fine. I had never used sql tags, but they make your
code much more pretty.
-----Mensaje original-----
De: Henri Yandell [mailto:bayard@generationjava.com]
Enviado el: miércoles, 23 de abril de 2003 8:07
Para: Tag Libraries Users List
Asunto: Re: DataSource && JSLT
Yes there is.
Firstly, all sql tags have a datasource attribute which allows you to
specify which datasource to use and it accepts a JNDI name.
Secondly, you can set a default datasource by adding:
<context-param>
<param-name>javax.servlet.jsp.jstl.sql.dataSource</param-name>
<param-value>jdbc/FooDS</param-value>
</context-param>
where FooDS is imported in your web.xml and is defined in your server.xml.
The only thing I have had problems doing is modifying the default
datasource using setDataSource, but it is possible with a slight change to
the JSTL source.
Hen
On Wed, 23 Apr 2003, Francisco Mesa Villlalba wrote:
>
> Is there a way to use a DataSource located in the JNDI enviroment with the
> sql tags?
>
> The sql:setdatasource tag requires url + driver + user + password, but I
> don't want to provide such information in every page, I wan´t to configure
> my DataSources in the server configuration in the same way I do for common
> JDBC access.
>
> Thanks in advance,
>
> Francisco
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: DataSource && JSLT
Posted by Henri Yandell <ba...@generationjava.com>.
Yes there is.
Firstly, all sql tags have a datasource attribute which allows you to
specify which datasource to use and it accepts a JNDI name.
Secondly, you can set a default datasource by adding:
<context-param>
<param-name>javax.servlet.jsp.jstl.sql.dataSource</param-name>
<param-value>jdbc/FooDS</param-value>
</context-param>
where FooDS is imported in your web.xml and is defined in your server.xml.
The only thing I have had problems doing is modifying the default
datasource using setDataSource, but it is possible with a slight change to
the JSTL source.
Hen
On Wed, 23 Apr 2003, Francisco Mesa Villlalba wrote:
>
> Is there a way to use a DataSource located in the JNDI enviroment with the
> sql tags?
>
> The sql:setdatasource tag requires url + driver + user + password, but I
> don't want to provide such information in every page, I wan�t to configure
> my DataSources in the server configuration in the same way I do for common
> JDBC access.
>
> Thanks in advance,
>
> Francisco
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org