1つのjspに2つ以上<br>自分が表示すべきエラーメッセージをそれぞれ表示させる方法
私は1つのjspでを2回使いましたが、それぞれ2つのformフォームに書きましたが、2つ書いた後、いずれかのフォームのコミットボタンをクリックします.この2つのは一緒にエラー情報を表示します.自分が表示すべきエラー情報をそれぞれ表示させるには、次の解決策を見てみましょう.
============================================
アクション:
JSPページ:
Actionでこのように設定すると、ページのプロンプト情報はリソースファイルから読み込まれません.
JSPページ:
======================
アクション:
ActionMessages message = new ActionMessages();
message.add(" ",new ActionMessage(" Key ",String ));
this.saveErrors(request,message);
return ActionForward;
JSPページ:
<html:errors property=" "/>
Actionでこのように設定すると、ページのプロンプト情報はリソースファイルから読み込まれません.
ActionMessages message = new ActionMessages();
message.add(" ",new ActionMessage("String ));",false));
this.saveErrors(request,message);
return ActionForward;
JSPページ:
<html:errors/> <html:errors property=" "/>