You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2005/03/09 00:04:18 UTC

DO NOT REPLY [Bug 33918] New: - Allow saveErrors(session, messages) like saveMessages(session, messages)

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=33918>.
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=33918

           Summary: Allow saveErrors(session, messages) like
                    saveMessages(session, messages)
           Product: Struts
           Version: 1.2.4
          Platform: Macintosh
        OS/Version: Mac OS X 10.0
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Controller
        AssignedTo: dev@struts.apache.org
        ReportedBy: matt@raibledesigns.com


I've found that saving errors in the session can be useful when I need to do a
redirect after catching the error.  Since saveMessage() can save into the
session and auto-remove them, I'd think it'd be easy enough to do this with
saveErrors().

As a workaround, in my Action I'm using:

session.setAttribute(Globals.ERROR_KEY, messages);

And in my JSP:

<%-- Error Messages --%>
<logic:messagesPresent>
    <div class="error">
        <html:messages id="error">
            <bean:write name="error" filter="false"/><br/>
        </html:messages>
        <!-- Error messages aren't automatically removed -->
        <c:remove scope="session" var="org.apache.struts.action.ERROR"/>
    </div>
</logic:messagesPresent>

-- 
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org