title: Java web application properties
body: <p>Does Java and/or Spring have the concept of properties? I have bunch of domain models, each of which has several properties. Example:</p>
  
  <pre><code>public class Person {
      private String name;
      private Date dateOfBirth;
      private float height;
      private float weight;
      // getters and setters not shown
  }
  </code></pre>
  
  <p>When displaying a person, the property names are hardcoded in the JSP.</p>
  
  <pre><code>Name: ${person.name}&lt;br&gt;
  Date of birth: ${person.dateOfBirth}&lt;br&gt;
  Height: ${person.height}&lt;br&gt;
  Weight: ${person.weight}&lt;br&gt;
  </code></pre>
  
  <p>Furthermore, there may be several different pages that display a person. Note that date of birth is a <code>java.util.Date</code>, so the JSP or controller will use <code>java.text.SimpleDateFormat</code> to format it. Height and weight are numbers, and they may have their own <code>java.util.Format</code> used for formatting.</p>
  
  <p>What I'm looking for a property lookup mechanism. Each property (name, date of birth, height, etc) would have the display name, format, and description (used for help or tooltips). The properties' attributes would be defined in a configuration file somewhere. When displaying a property, the display name and format would be looked-up via the property mechanism. This would also solve localization.</p>
  
  <p>My question is if there's already something like this implemented for Java.</p>