tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "c cw288" <cw...@hotmail.com>
Subject Re: FW: How to connect JDBC-ODBC in Tomcat
Date Wed, 08 Nov 2000 14:33:59 GMT
Hi Maurice,

In web.xml, I replaced following param names.
What do you meant by param-value?

<init-param>
        <param-name>sun.jdbc.odbc.JdbcOdbcDriver</paramName> //This is the 
driver class
        <param-value>my.driver.ClassName</param-value>  //???
</init-param>

<init-param>
        <param-name>jdbc:odbc:TrainDatabase</paramName>  // This is my 
database name (url)
        <param-value>jdbc:my_url</param-value>           //??
</init-param>


In my Java servlet program, I declared my drive and url as followed:

    private String dbDriver = "sun.jdbc.odbc.JdbcOdbcDriver";
    private String dbURL = "jdbc:odbc:TrainDatabase";

Thanks,



>
> > -----Original Message-----
> > From:	Maurice le Rutte [SMTP:maurice@lerutte.net]
> > Sent:	Tuesday, November 07, 2000 3:07 PM
> > To:	tomcat-user@jakarta.apache.org
> > Subject:	Re: How to connect JDBC-ODBC  in Tomcat
> >
> > -----Oorspronkelijk bericht-----
> > >Hi All,
> > >
> > >I have an Applet-Servlet application that work on Java Web Server
> > >engine and can access the Access database through JDBC-ODBC (System 
>DSN).
> > >
> > >When I placed my application on Tomcat and run it, it does not know
> > >where to look for the database. How I do setup this connection so that
> > >my application will run as is it run on Java Web Server?
> >
> >
> > Just specify the init params in your web.xml. For example:
> >
> > In web.xml:
> >
> > <init-param>
> >         <param-name>jdbc.driverclass</paramName>
> >         <param-value>my.driver.ClassName</param-value>
> > </init-param>
> >
> > <init-param>
> >         <param-name>jdbc.url</paramName>
> >         <param-value>jdbc:my_url</param-value>
> > </init-param>
> >
> > <init-param>
> >         <param-name>jdbc.username</paramName>
> >         <param-value>me</param-value>
> > </init-param>
> >
> > <init-param>
> >         <param-name>jdbc.password</paramName>
> >         <param-value>secret</param-value>
> > </init-param>
> >
> > For access you use the sun.jdbc.JdbcOdbcBridge class and the url is
> > jdbc:odbc:DSN. You donut need a user/password.
> >
> > Maurice le Rutte.

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


Mime
View raw message