0

プロパティ ファイル (リソース バンドル) があります。プロパティファイルからエラーをロードして、jsp の 1 つにエラーを表示しようとしています。プロパティファイルに次のようなエントリがあります。

errors.password.rules=<font color="red">The password you have entered does not 
meet password strength requirements.  Please select a new password that conforms 
to the following standards:<UL><LI>Minimum length of 8 characters</LI>
<LI>Maximum length of 18 characters</LI><LI>At least one upper-case character</LI>
<LI>At least one lower-case character</LI><LI>At least one non-alphabetic character</LI>
<LI>Does not contain 3 or more consecutive repeating characters (e.g. AAA)</LI>
<LI>Does not contain the User ID</LI><LI>Does not contain common dictionary words 
more than 4 characters long</LI><LI>New Password should not be the same as 
previous password</LI></UL></font>

ストラット 1 を使用してロードした場合の上記は、次のように表示されます

The password you have entered does not meet password strength requirements. 
Please select a new password that conforms to the following standards:
  • 8文字以上
  • 最大長 18 文字
  • 少なくとも 1 つの大文字
  • 少なくとも 1 つの小文字
  • 少なくとも 1 つの英字以外の文字
  • 3 つ以上の連続する繰り返し文字を含まない (例: AAA)
  • ユーザー ID を含まない
  • 4文字を超える一般的な辞書の単語が含まれていません
  • 新しいパスワードは以前のパスワードと同じであってはなりません

Struts 2 でロードした場合と同じように、出力については添付ファイルを参照してください。

• The password you have entered does not meet password strength requirements. 
  Please select a new password that conforms to the following standards:

o Minimum length of 8 characters 
o Maximum length of 18 characters 
o At least one upper-case character 
o At least one lower-case character 
o At least one non-alphabetic character 
o Does not contain 3 or more consecutive repeating characters (e.g. AAA) 
o Does not contain the User ID 
o Does not contain common dictionary words more than 4 characters long 
o New Password should not be the same as previous password

上記は、次の行にそれぞれが丸で囲まれた箇条書きで表示されています。そして、弾丸が最初の行に来ています

struts 1.x の場合と同じように、エラーをロードするためにプロパティ ファイルにどのような変更を加える必要があるかを提案してください。

4

1 に答える 1