Announcement Announcement Module
Collapse
No announcement yet.
How to add a key-value in ApplicationResource.Properties Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to add a key-value in ApplicationResource.Properties

    Hi
    Please send me some code snippet on how to add a new key-value pair in ApplicationResource.propertis file.Im developing a tool which will help in managing the ApplicationResource.properties , Im using the struts framework to attain this.This will make a user to define his own key value pairs....

    Regards
    Kiran Kumar [/code]

  • #2
    If you really want to let users mess around with your properties files, you can use standard java code like
    Code:
    java.util.Properties.load(file)
    And then call setProperty(). You can also save the Properties object back to file.

    Beware however that this save will remove any comments or ordering that you have in the file. I suggest you use two properties files, one which won't change (i18n for your code) and one that users can mess around with.

    Comment

    Working...
    X