I'm creating a struts application and I would like to have all of my
constants in a single file, perhaps my application's resource bundle.
I'd like this data to contain such info as the maximum length of various
input fields (eg cityLengthMax = 100) and be able to refer to this in my
validation.xml file for input validation.  At the moment I seem to have
to hard code these values in the validation.xml file.
 
Is this possible?  Can I use vars in the validation.xml file that refer
to values in another file.  I'd like to use the same constant lengths in
multiple applications (because they use the same columns in the same
tables in the same database).
 
At the moment I'm forced to do this.
 
        <constant>
            <constant-name>cityLengthMax</constant-name>
            <constant-value>10</constant-value>
        </constant>
 
Whereas I'd like that 10 to be a pointer to a value held elsewhere.
 
alan

Reply via email to