我正在尝试使用struts 1.3框架创建一个简单的登录应用程序。
要验证userName和Password,我正在尝试实现ValidatorPlugin。
我正在使用eclipse IDE。当我创建项目时,eclipse会自动创建一个 “ApplicationResources.properties”文件。但是此属性文件为空。没有默认条目,如:
# -- validator --
errors.invalid={0} is invalid.
errors.maxlength={0} can not be greater than {1} characters.
errors.minlength={0} can not be less than {1} characters.
errors.range={0} is not in the range {1} through {2}.
errors.required={0} is required.
errors.byte={0} must be an byte.
errors.date={0} is not a date.
errors.double={0} must be an double.
errors.float={0} must be an float.
errors.integer={0} must be an integer.
errors.long={0} must be an long.
errors.short={0} must be an short.
errors.creditcard={0} is not a valid credit card number.
errors.email={0} is an invalid e-mail address.
如何避免手动输入上述行并在我的属性文件中预先生成这些条目?