struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "White, Joshua A (CASD, IT)" <>
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?  



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:
For additional commands, e-mail:

View raw message