<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>O Blog do Gustavo Felisberto &#187; struts2</title>
	<atom:link href="http://blog.felisberto.net/tag/struts2/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.felisberto.net</link>
	<description>Life, the universe and all the rest</description>
	<lastBuildDate>Tue, 15 Mar 2011 11:57:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Struts2 ActionMessages and redirect</title>
		<link>http://blog.felisberto.net/2008/10/15/struts2-actionmessages-and-redirect/</link>
		<comments>http://blog.felisberto.net/2008/10/15/struts2-actionmessages-and-redirect/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 15:40:45 +0000</pubDate>
		<dc:creator>Gustavo Felisberto</dc:creator>
				<category><![CDATA[Ciência/Tecnologia]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[interceptor]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[struts2]]></category>

		<guid isPermaLink="false">http://blog.felisberto.net/?p=1417</guid>
		<description><![CDATA[Lets say you have an Action that lists some items. And you have another action that adds items. If you add an Item you can either just show a &#8220;blank&#8221; with the &#8220;All ok with addition&#8221; or even smarter is to use the ListAction. But how do you give feedback to the user that the [...]]]></description>
			<content:encoded><![CDATA[<p><span class="dropcap">L</span>ets say you have an Action that lists some items. And you have another action that adds items.</p>
<p>If you add an Item you can either just show a &#8220;blank&#8221; with the &#8220;All ok with addition&#8221; or even smarter is to use the <em><result type="redirectAction">ListAction</result></em>. But how do you give feedback to the user that the addition was ok? Simple you just <em>addActionMessage(&#8220;Item added ok&#8221;);</em> on the first action and the message will be rendered by the <em>s:actionmessage</em> in the jsp of the second. Right? Wrong!!<br />
Struts will &#8220;eat&#8221; ActionMessages and ActionErrors between the first and second action. But Glindholm <a href="http://glindholm.wordpress.com/2008/07/02/preserving-messages-across-a-redirect-in-struts-2/">solved the problem</a> with a simple Interceptor.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.felisberto.net/2008/10/15/struts2-actionmessages-and-redirect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

