public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
InputStream in=this.getServletContext().getResourceAsStream("/WEB-INF/classes/db.properties");
Properties properties=new Properties();
properties.load(in);
String url=properties.getProperty("url");
System.out.println(url);
}
访问web资源的模板代码
最新推荐文章于 2024-05-21 23:53:50 发布