Thanks for fast reply Mayer, as for the connection here is part of my code.
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.net.*;
import java.sql.*;
import java.util.Date;
public class MyLogin extends HttpServlet
{
static Connection c = null;
//********************************************************************************************
public
String getServletInfo()
{
return "Bienvenue Servlet: MyLogin.java";
}
public void init(ServletConfig config) throws ServletException
{
super.init(config);
String url = "jdbc
dbc
b";
String nom="JAVA";
String pw="JAVA";
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
c = DriverManager.getConnection(url, nom, pw);
}
catch (ClassNotFoundException e)
{
System.out.println(e.getMessage() );
}
catch (Exception ee)
{
System.out.println(ee.getMessage() );
}
}
//********************************************************************************************
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException
{
.......
.......
}
//********************************************************************************************
public void destroy()
{
try
{
c.close();
c = null;
}
catch(Exception e)
{
System.out.println("erreur de statement " + e.getMessage());
}
}
public static Connection getConnection()
{
return c;
}
}
thanks again