Title: RE: Tomcat and Access Database

Actually I am connecting to jdbc through servlets for retrieving information of employee skillsets.
It is working coolly with jsdk but i don't know how to make it work with tomcat server.
I want to know the configuration to set it in tomcat Server.xml file and web.xml file.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 30, 2001 11:11 AM
To: [EMAIL PROTECTED]
Subject: RE: Tomcat and Access Database


what is the value of query ?

> -----Original Message-----
> From: Sridevi Kumar [SMTP:[EMAIL PROTECTED]]
> Sent: 30 April 2001 15:54
> To:   '[EMAIL PROTECTED]'
> Cc:   Sridevi Kumar
> Subject:      Tomcat and Access Database
>
> Hello,
> I am Using Access Database to connect with JDBC in Java and my program
> looks like this...
>
> public class ...{
> ..............
> ................
> ...............
>
> try{
> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> con=DriverManager.getConnection("jdbc:odbc:shree");
> }catch(Exception e){
> e.printStackTrace();
> System.exit(1);
> }
>
> try{
>       
>         stmt=con.createStatement();
>         ResultSet rs=stmt.executeQuery(query);
>         ResultSetMetaData rsmd=rs.getMetaData();
>         System.out.println("");
>         out.println("<font color=gray>");
> out.println("<u><b>"+"The Developers with " +level+ " Skill level in
> "+softwarename + " is/are :"+"</b></u>");
> out.println("</font>");
> out.println("<hr border=2 color=midnightblue>");
>         out.println("\n");
>         out.println("<br>");
>         int no_column=rsmd.getColumnCount();
>         for(int i=1;i<=no_column;i++){
>                 if(i>1) out.print(",");
>                 String columnnames=rsmd.getColumnName(i);
>                 out.print("<B>"+columnnames+"\t\t"+"</b>");
>                 }
>                 out.println("<br>");
>                
>                 while(rs.next()) {
>                 for(int i=1;i<=no_column;i++){
>                 if(i>1) out.print(",");
>                 String columnValue=rs.getString(i);
>                 out.print(columnValue+"\t\t");
>                 }
>                 out.println("<br>");
>                 }
>                 stmt.close();
>                 con.close();
>                 }catch(java.sql.SQLException e){
> System.out.println(e.toString());
> }
> out.close();
> }
> }
>
>
>
>
>
> Please help me to connect this program to Tomcat and work from tomcat
> server.
> It's very urgent...
>
> Thank You.
>

Reply via email to