从ActionMessage中删除消息

时间:2013-01-24 15:37:06

标签: java struts

如何从ActionMessage中删除特定的错误消息。例如,msgKey下面是"ABC"msg.getKey()"ABC"。现在两者都相同时我想从ActionMessage中删除密钥。我该怎么做?

Iterator it = warningMessages.get(ActionMessages.GLOBAL_MESSAGE);       
while (it.hasNext()) {
    ActionMessage msg = (ActionMessage) it.next();
    if (msgKey.equalsIgnoreCase(msg.getKey())) {
                // remove msgKey from warningMessages
    }
}

0 个答案:

没有答案