|
Thanks for Eranga's answer!
In my project there is an XML file in web/web-inf/.It contains this website name,database server's ip,database's account and password!
Example:
<root>
<appName>desinged by sylvester</appName>
<appUrl>http://localhost:8080/sylv/</appUrl>
<appServerPath>file:///javawork/myWeb1/build/web/</appServerPath>
<appUploadFilePath>file:///javawork/myWeb1/build/web/upfile/</appUploadFilePath>
<appPageSize>20</appPageSize>
<appDbConf>
<dbHost>127.0.0.1</dbHost>
<dbPort>3306</dbPort>
<dbName>myapp</dbName>
<dbUser>sylvester</dbUser>
<dbPwd>sylv</dbPwd>
</appDbConf>
</root>
I desined a class can get these parameters from this xml,and the class can update this xml file. So I need to know this file's absolute path in disk.When construct the class which can update xmlfile,I use "this.getClass().getResource()" get the path.So,the classs in build folder and the class src folder will get two different paths.It's a difficulty when I debug my project!
That is all my mind!
Maybe my mind is wrong?
By the way ,can I add your name in buddy list??
__________________
one for all,all for one!
Last edited by sylvpan : 03-26-2008 at 04:21 AM.
Reason: there some syntax error
|