读取web-inf里的文件
String userName = " " ;
String userPassWord = " " ;
String driver = " " ;
String url = " " ;
private Properties props = new Properties();
public remoteDBFactory()
{
try
{
InputStream is = getClass ().getClassLoader ().getResourceAsStream ( "/remotejdbc.properties ") ;
props.load (is) ;
userName = props.getProperty ( "userName ") ;
userPassWord = props.getProperty ( "userPassWord ") ;
driver = props.getProperty ( "driver ") ;
url = props.getProperty ( "url ") ;
}
catch (Exception e)
{
System.out.println(e);
}
}