there can be two things to change: if ur using tc5 you can change your
dbcp resource via yourcustomapp.xml (conf/catalina/localhost/)

  <Resource name="jdbc/yourcustomname" auth="Container"
type="javax.sql.DataSource"/>
  <ResourceParams name="jdbc/yourcustomname">
    <parameter>

and then in your web.xml

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

On Sun, 29 Aug 2004 14:29:22 -0700, Jack Lauman <[EMAIL PROTECTED]> wrote:
> I'm using the following code in a servlet to get a JDBC connection:
> 
> Context ctx = new InitialContext();
> DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/DBNameDS");
> Connection conn = ds.getConnection();
> 
> It works fine... but I would like to be able to substitute "DBNameDS"
> with the actual name of the ds as defined in the web.xml file.
> 
> How can this be done?
> 
> Jack
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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

Reply via email to