I have an object which I use to collect parameters. Let's call this RedirectParameters. Among the parameters it knows to collect (String, int, etc) are ActionMessage and ActionError objects. When I pass it a message, it expands the message and adds it as a URL. The RedirectParameters gets saved in the request scope. (Another option is to extend ActionForward to handle this, and return a new instance of this subclass instead of mapping.findForward().) In my RequestProcessor, I check if the forward is for a redirect (forward.getRedirect() returns true), and if so, I get the RedirectParameters from the request scope and form my URL parameters. ActionMessage and ActionError messages are given a unique parameter to avoid conflicts (com.mycompany.myapp.something). I append this to the URL passed to response.sendRedirect(). Also in my RequestProcessor, I check for the unique request parameters, and when they are present, I instantiate ActionMessage and ActionError objects as appropriate and save them in the request scope so it gets handled as usual. To summarize: 1. I see I need a redirect, so I collect my parameters 2. Before my RequestProcessor calls sendRedirect(), it collects the parameters and appends them to the URL 3. When my RequestProcessor processes a ForwardConfig, it checks for request params designated to ActionMessage and ActionError messages, and stores them in the request scope where the JSP or Action object can access them like other messages/errors.
-----Original Message----- From: Adrian Baisch [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2003 10:07 AM To: Struts Users Mailing List Subject: RE: problem whith saveMessages I do not understand, you can offer me but details, Thanks . At 12:48 30/10/2003, you wrote: >I do this my passing the message as a parameter, having the >RequestProcessor intercept it, and re-save in the request scope. > >-----Original Message----- >From: Adrian Baisch [mailto:[EMAIL PROTECTED] >Sent: Thursday, October 30, 2003 9:36 AM >To: [EMAIL PROTECTED] >Subject: problem whith saveMessages > > >Hi, I have a question I'd like to ask: > > > >I have a ConfirmationAction that sets up some success messages using: > >messages.add(new ActionMessage("timesheetManage.save.success")); >saveMessages(request, messages); > > >And upon this save, the findForward("success") forwards to another >action class with: > ><forward > name="success" > path="/do/confirmation.jsp" redirect="true" /> > >But on the JSP after, there are no messages displayed. I know the >answer why, and that is because "redirect=true". However, this is the >only way I can forward to another action class in iPlanet. > > But on the JSP after, there are no messages displayed. I know the >answer why, >and that is because "redirect=true". > >Anyone know of a workaround to carry these messages into the next page? > >Any suggestions? >Thanks in advance > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]