Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 11885 invoked from network); 29 Jun 2007 14:10:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jun 2007 14:10:26 -0000 Received: (qmail 93946 invoked by uid 500); 29 Jun 2007 14:10:14 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 93916 invoked by uid 500); 29 Jun 2007 14:10:14 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 93904 invoked by uid 99); 29 Jun 2007 14:10:14 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jun 2007 07:10:14 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of tolyen@gmail.com designates 209.85.132.244 as permitted sender) Received: from [209.85.132.244] (HELO an-out-0708.google.com) (209.85.132.244) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jun 2007 07:10:11 -0700 Received: by an-out-0708.google.com with SMTP id c37so230647anc for ; Fri, 29 Jun 2007 07:09:48 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=b4OypWdxaEHrRDBqqEyzNKSr6F5R0SviZdW+/NEZrKWNMoldHwX74nvelSeqg3Ycq8zd9TSST8UwWNW/9cWrUeQiuWgnYOBqhLq2vFUP3t566C/+f4FXZAnLSeaXtzNMEzJ15G1i5FSXWJWvW+lGGNe82RmBBYwzesc26GU/Vs4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=RyDuy4Ql1Pmw+rgdZEZLfXBm/JRywr9XpS08nwh0RTPcB3FbutQfrgeK7Xh8rTmtx6ixYJXQ56T5sUh6lQLic4LEZH0JYBZ0BVy7lVWspVGw5ABoSErmV5NU3bAgRHRORTJWzBx7DdD8qLUTyxoqZwp7DxmVa2gnX3PKcqbPGxg= Received: by 10.100.144.11 with SMTP id r11mr2144674and.1183126188495; Fri, 29 Jun 2007 07:09:48 -0700 (PDT) Received: by 10.100.136.20 with HTTP; Fri, 29 Jun 2007 07:09:48 -0700 (PDT) Message-ID: Date: Fri, 29 Jun 2007 17:09:48 +0300 From: "=?ISO-8859-1?Q?Toni_Lyytik=E4inen?=" To: "Struts Users Mailing List" Subject: How to pass messages that survive redirects? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_85979_2795041.1183126188325" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_85979_2795041.1183126188325 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I've used to doing something like this in Ruby on Rails: if @object.updateAttributes(params[:object]) flash[:notice]="Update succesful!" redirect_to :action=>'list' else ... Now that I'm using Struts 2 for a project I tried doing something similar: try { objectService.save(getObject()); addActionMessage("Update succesful!"); return "redirect"; } catch (...) But I found out that the actionmessages don't show in the redirected action anymore (probably because then it's another instance of that class that doesn't have the same actionmessages property), even though I have the -tag. Is there a mechanism to pass messages from actions that survive a redirect? Or should I just put them into the users session? ------=_Part_85979_2795041.1183126188325--