怎样读资源文件里数据 ApplicationResources.properties中有loginuser = 登陆用户<%//这里如何获取资源ApplicationResources.properties 中loginuser的数据%>知道的请贴下代码... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 public class readProperties { public static void readFile(){ File in=new File("test.properties");// try { FileInputStream filein=new FileInputStream(in); Properties file=new Properties(); file.load(filein); System.out.println(file.getProperty("name")); System.out.println(file.getProperty("id")); System.out.println(file.getProperty("password")); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public static void main(String[] args){ readProperties.readFile(); }} Java 查询结果没有行 jstl 遍历td中的table ,要求每7个列换一新行 Spring 可以自定义拦截器吗 求各位大哥指导,怎么跳到自定义的404页面 请问在JSP中能否实现像asp中的xmlhttp的功能?急!!!!! 如何向BEAN中传入APPLICATION Soap的一些代码 web service 那里有免费的jsp写的bbs下载,哪位大哥推柬一下,多谢! 10万元做这个项目怎么样? 关于javabeans编译问题,请高手指点! 有人见过这样写的JAVA函数吗?是什么意思啊?? 通过出生日期返回年龄 怎么实现?
public static void readFile(){
File in=new File("test.properties");//
try {
FileInputStream filein=new FileInputStream(in);
Properties file=new Properties();
file.load(filein);
System.out.println(file.getProperty("name"));
System.out.println(file.getProperty("id"));
System.out.println(file.getProperty("password"));
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static void main(String[] args){
readProperties.readFile();
}
}