J
jacer
Unregistered / Unconfirmed
GUEST, unregistred user!
我用
public class openDB implements java.io.Serializable
{
private String sDBDriver;
//="oracle.jdbc.driver.OracleDriver";
private String sConnStr;
//="jdbcracle:thinlocalhost:1521:jacer";
private Connection conn=null;
public openOracle() throws ServletException
{
ServletConfig config = getServletConfig();
~~~~~~~~~~~~~~~~~~
/////////// 这里出错了cannot resolve symbolsymbol:method getServletConfig()
sDBDriver = config.getInitParameter("jdbcDriverClassName");
sConnStr = config.getInitParameter("jdbcConnectString");
....
}
我该如何得到一个ServletConfig对象?
public class openDB implements java.io.Serializable
{
private String sDBDriver;
//="oracle.jdbc.driver.OracleDriver";
private String sConnStr;
//="jdbcracle:thinlocalhost:1521:jacer";
private Connection conn=null;
public openOracle() throws ServletException
{
ServletConfig config = getServletConfig();
~~~~~~~~~~~~~~~~~~
/////////// 这里出错了cannot resolve symbolsymbol:method getServletConfig()
sDBDriver = config.getInitParameter("jdbcDriverClassName");
sConnStr = config.getInitParameter("jdbcConnectString");
....
}
我该如何得到一个ServletConfig对象?