StrutsMemo001

BACK

Actionクラスでメッセージリソースを利用

MessageResources msgres = getResources(request);
String key = "welcome.title";
System.out.println(msgres.getMessage(key));

ActionFormクラスでメッセージリソースを利用

MessageResources msgres = (MessageResources)request.getAttribute("org.apache.struts.action.MESSAGE");
String key = "welcome.title";
System.out.println(msgres.getMessage(key));
最終更新:2013年08月02日 16:55