struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "White, Joshua A (CASD, IT)" <Joshua.Wh...@thehartford.com>
Subject Beginner question
Date Wed, 19 Mar 2003 12:59:35 GMT
I have two struts actions:

	"insertIt" - adds an item to the database.  When successful, this
action forwards to the "viewIt" action putting the newly inserted items
itemId into the request.
	"viewIt" - views an item by itemId (retrieves itemId from request)

When "insertIt" successfully completes, It forwards to "viewIt" without a
redirect.  As many of you know, if the user then refreshes the page, the
insert action is performed again.

To solve this problem, I changed the redirect attribute to "true".  The
refresh problem disappears.  However, the request variable "itemId" gets
lost because of the redirect.  

I know this is something every struts developer has worked through.  Could
someone suggest a pattern for this type of transaction?  

Regards,

Joshua


This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message