Adding data in .properties file during runtime?

ok, so, i have a properties file that contains unlimited number of IP addresses:

IPAddress.properties

1=127.16.0.9

2=...

.

.

.

n

what i want to do here is to display the data from that file (using a jsp page) and at the same time let the end-user add, edit or delete the contents inside the property file. could that be possible? and can i use the <f:loadBundle> tag? i really need help...tnx.

[454 byte] By [nikaido_cateka] at [2007-11-27 7:32:25]
# 1

nikaido,

Whilst .properties files where not really intended to be used this way I see no particular reason why you can't, for a SINGLE USER app... but if you're talking multiuser (even two) things tend to get ugly quicky... I suspect that you'd be better of just going to a DB.

Do you know how to save a properties file? There's a good tutorial on it here http://java.sun.com/docs/books/tutorial/essential/environment/properties.html

... and I spotted some nice example code at java ranch a while back with a really cool "properties for dummies" wrapper class, which makes the simple stuff really really simple.

Hope that helps.

Keith.

corlettka at 2007-7-12 19:12:40 > top of Java-index,Java Essentials,New To Java...