[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglibs-user
Subject:    Re: Cannot access JNDI datasource from SQL JSTL
From:       Hassan Schroeder <hassan () webtuitive ! com>
Date:       2003-12-30 12:47:09
Message-ID: 3FF173CD.8060104 () webtuitive ! com
[Download RAW message or body]

Dima Gutzeit wrote:

> You can use the JSTL way , not JNDI directly.
> put the following in the we.xml of your application
> 
> <context-param>
>   <param-name>
>               javax.servlet.jsp.jstl.sql.dataSource
>          </param-name>
>   <param-value>
>               jdbc:mysql://your.ip/dbname,driver.name,user,password
>         </param-value>
>  </context-param>

? I'm no expert here, but in my web.xml file I'm using:

  <context-param>
     <param-name>javax.servlet.jsp.jstl.sql.dataSource</param-name>
     <param-value>jdbc/MyDBName</param-value>
  </context-param>

  <resource-ref>
       <description>DB Connection</description>
       <res-ref-name>jdbc/MyDBName</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
  </resource-ref>

:: referring back to the DataSource defined in server.xml.

FWIW,
-- 
Hassan Schroeder ----------------------------- hassan@webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.




---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic