Hi all,
can you see something wrong with my class as when I tried to compile it, I got the message error:
package javax.servlet does not exist?
Thanks for your time.
package Mypackage;
import java.util.*;
import java.sql.*;
import javax.servlet.UnavailableException;
public class ConnectionManager {
public ConnectionManager(){
}
static Connection getConnection(){
try{
Class.forName("com.mysql.jdbc.Driver").newInstance();
String url = "dbUrl";
String pwd = "dbPwd";
String user = "dbUser";
Connection conn = DriverManager.getConnection(url,pwd,user);
}
catch (Exception e){
throw new UnavailableException(e.getMessage());
}
}
}
can you see something wrong with my class as when I tried to compile it, I got the message error:
package javax.servlet does not exist?
Thanks for your time.
package Mypackage;
import java.util.*;
import java.sql.*;
import javax.servlet.UnavailableException;
public class ConnectionManager {
public ConnectionManager(){
}
static Connection getConnection(){
try{
Class.forName("com.mysql.jdbc.Driver").newInstance();
String url = "dbUrl";
String pwd = "dbPwd";
String user = "dbUser";
Connection conn = DriverManager.getConnection(url,pwd,user);
}
catch (Exception e){
throw new UnavailableException(e.getMessage());
}
}
}