Hai,
Sorry for the delay.Here is what u want.I have given below the getconnection java file.
dsn stands for Data Source Name.(Specify your dsn here).
package packagename;
import java.sql.*;
public class getconnection
{
public Connection getconnection(
String dsn)
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc

dbc:"+dsn;
Connection con=DriverManager.getConnection(url);
return con;
}
catch(ClassNotFoundException e)
{
System.out.println("class not found....");
return null;
}
catch(SQLException se)
{
System.out.println("unable to connect");
return null;
}
}
}
When u call this file from the
jsp page,do the following.The code below has to be given in the jsp page.
*****************************************************************
getconnection gc=new getconnection();
Connection con=gc.getconnection(dsn);
*****************************************************************
This will pass dsn(Your data source name) to the java file.
regards,
kichu.
once again ,sorry for the delay!!!
[This message has been edited by kichu kichu (edited May 20, 2001).]