DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=36276>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=36276 Summary: Struts Tag <html:messages/> sets message to null when iterating 2nd time Product: Struts Version: 1.2.7 Platform: Other OS/Version: other Status: NEW Severity: critical Priority: P2 Component: Custom Tags AssignedTo: dev@struts.apache.org ReportedBy: [EMAIL PROTECTED] Struts Tag <html:messages/> sets current message to null if the message type "resource" is set to false. This results in an exception when the JSP is evaluated: <bean:write/> doesn't find the bean in expected page scope. I found the error in the code of the implementing tag class. class: org.apache.struts.taglib.html.MessagesTag CVS Id: $Id: MessagesTag.java 164530 2005-04-25 03:11:07Z niallp $ release: Struts 1.2.7 erroneous code (lines 253..260): ActionMessage report = (ActionMessage) iterator.next(); String msg = TagUtils.getInstance().message( pageContext, bundle, locale, report.getKey(), report.getValues()); should be replaced by: ActionMessage report = (ActionMessage) this.iterator.next(); String msg = null; if (report.isResource()) { msg = TagUtils.getInstance().message( pageContext, bundle, locale, report.getKey(), report.getValues()); } else { msg = report.getKey(); } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]