V
vincente13
Hi all,
I have this servlet that when it is called, it would update a
config(.ini) file that is bundled with it together as a webapp.
Users are able to enter a new username via a form and the servlet will
be called when the user press the submit button.
However the test.ini is not updated, any ideas to solve this issues?
FileInputStream in = new FileInputStream("test.ini");
Properties p = new Properties();
p.load(in);
p.setProperty("MailUserName", +userName);
p.store(new FileOutputStream("test.ini"), null);
There isn't any issues if an absolute path is given but i would need to
update the test.ini that is within the webapp.
p.store(new FileOutputStream("c:\\test.ini"), null);
Appreciate any advice
I have this servlet that when it is called, it would update a
config(.ini) file that is bundled with it together as a webapp.
Users are able to enter a new username via a form and the servlet will
be called when the user press the submit button.
However the test.ini is not updated, any ideas to solve this issues?
FileInputStream in = new FileInputStream("test.ini");
Properties p = new Properties();
p.load(in);
p.setProperty("MailUserName", +userName);
p.store(new FileOutputStream("test.ini"), null);
There isn't any issues if an absolute path is given but i would need to
update the test.ini that is within the webapp.
p.store(new FileOutputStream("c:\\test.ini"), null);
Appreciate any advice