Topic: 急,急在javabean中,读取文件的问题 |
Print this page |
1.急,急在javabean中,读取文件的问题 | Copy to clipboard |
Posted by: cainiao Posted on: 2003-05-23 21:05 在javabean中读取文件,代码如下: String filename="\\sys.ini"; java.io.BufferedReader m = new java.io.BufferedReader(new InputStreamReader(new FileInputStream(filename))); int i=0; while((c=m.readLine())!=null){ argss[i]=c; out.print(argss[i]); i++; } 把javabean发布到j2ee自带的deploytool上,以后无论怎么改 sys.ini的内容,程序读出的永远是第一次读sys.ini时的内容,这是 怎么回事。难道在服务器上有缓存 |
2.Re:急,急在javabean中,读取文件的问题 [Re: cainiao] | Copy to clipboard |
Posted by: FinalFantasy Posted on: 2003-05-24 01:51 你的sys.ini存盘没有? 不应该有缓存的。你的那个sys.ini,是放在哪里的?。确认你改动的sys.ini是正确的。 |
3.Re:急,急在javabean中,读取文件的问题 [Re: cainiao] | Copy to clipboard |
Posted by: bujinwang Posted on: 2003-05-24 07:58 The bean may or may not cached, depending on how the container implements it. The basic idea is not to do I/O wihtin a bean. |
4.Re:急,急在javabean中,读取文件的问题 [Re: cainiao] | Copy to clipboard |
Posted by: FinalFantasy Posted on: 2003-05-24 10:38 It's a javabean,,not an EJB,,,i suppose. or I misunderstood it..sorry. What do you mean by not doing it within a bean, where can i do it then? |
5.Re:急,急在javabean中,读取文件的问题 [Re: cainiao] | Copy to clipboard |
Posted by: cainiao Posted on: 2003-05-24 11:52 sys.ini当然存盘了,路径也是正确的 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |