Properties props = new Properties();
InputStream in = new BufferedInputStream (new FileInputStream(Thread.currentThread().getContextClassLoader().getResource("resource/config.properties").getFile()));
props.load(in);
String jdbcDriver = props.getProperty ("driverClassName");
String jdbcUrl = props.getProperty ("url");
String jdbcUser = props.getProperty ("username");
String jdbcPassword = props.getProperty ("password");
用法 <%=jdbcDriver %>