lz是用jsp吗?如下
<%@page import="java.io.InputStream" %>
<%@page import="java.util.Properties" %><%
InputStream is= application.getResourceAsStream("/db.properties");
Properties props = new Properties();
props.load(is);
%>
<%@page import="java.io.InputStream" %>
<%@page import="java.util.Properties" %><%
InputStream is= application.getResourceAsStream("/db.properties");
Properties props = new Properties();
props.load(is);
%>
解决方案 »
- java数组操作
- JFreechart生成报表(是个饼状图)后 如何在生成个world文档
- struts验证问题,提交后,错误信息没有显示
- j2ee在北京找工作
- 如何禁用Hibernate的二级缓存?
- tomcat5.0中怎么打不开服务器上的中文名称的word文档,急!!在浏览器中直接输也不行。
- Help!调式一段java socket取Http协议的小代码。
- tomcat的怪问题。。。。 (在线等)
- 散分啊!!!!
- 请教并讨论BMP和CMP的选择和使用问题
- Kettle熟习的快进 急救,刚上岗就遇到的难题!!!
- Tomcat Debug模式下调试Servlet时出现Source not found.和一个Edit Source Lookup Path...的按钮
<%@page import="java.io.InputStream" %>
<%@page import="java.util.Properties" %><%
InputStream is= application.getResourceAsStream("/db.properties");
Properties props = new Properties();
props.load(is);
%>
Properties property = new Properties();
property.load(in);
ResourceBundle bundle = ResourceBundle.getBundle("db");
String driverClassName = bundle.getString("driverClassName");
Properties property = new Properties();
property.load(in);
ResourceBundle bundle = ResourceBundle.getBundle("db");
String userName = bundle.getString("userName");
InputStream in = FileOperateUtils.class.getClassLoader().getResourceAsStream("/sys.properties");
if(in == null){
in = FileOperateUtils.class.getClassLoader().getClass().getResourceAsStream("/sys.properties");
}