请问呀 ???我上传文件保存的路径是在linu上(http://222.222.146.92/color/example2/e2_uploadFiles/pic)下面
要获取它url也就是(url=http://222.222.146.92/color/example2/e2_uploadFiles/pic)
现在我要能过配置文件来读取得到url地址呀 ???
请问有没有什么好方法?
应该怎么写呀
要获取它url也就是(url=http://222.222.146.92/color/example2/e2_uploadFiles/pic)
现在我要能过配置文件来读取得到url地址呀 ???
请问有没有什么好方法?
应该怎么写呀
解决方案 »
- 做邮件系统遇到可一点问题
- 在innerHTML中为什么struts2标签不可以用,老是报org.apache.jasper.JasperException: /age.jsp(37,40
- jsp可否调用paint方法?谢谢
- 是不是struts的bug?
- JSP中条件设置where name like '%变量%'执行出错,请帮忙。。。。
- 请教 html-el使用问题
- 我要用超连接传值,(十几个),怎么传?
- package Arith does not exist!为什么?
- 求救!关于jsp包含文件问题
- 求高手分析req.getSession().getAttribute() 与req.getAttribute()两种
- DynamicOptionList技术问题
- struts 散分
try {
Properties prop = new Properties();
prop.load(new FileInputStream(filePathName));
value = prop.getProperty(name);
} catch (IOException ex) {
System.out.println("读取参数出错,查看文件是否存在!");
ex.printStackTrace();
}上面是读取
================
下面是写入try {
Properties prop = new Properties();
prop.setProperty(name,value);
prop.store(new FileOutputStream(filePathName), "comments");
} catch (IOException ex) {
System.out.println("写入数据出错,查看文件是否可写!");
ex.printStackTrace();
}
url=http://222.222.146.92/color/example2/e2_uploadFiles/pic
那用xx.properties存就好了呀
上面这个filePathName就是这个文件的路径全名了
你可以建一个空白的文件 也可以不建 只要路径搞对了 用上面给的两个方法 就可以读写了
prop.getProperty();
方法用不了呀