Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Struts
Refresh Problem : same action gets called
sachin jauhari
Greenhorn
Posts: 15
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
When we do a refresh on a
jsp
page,
the same
struts
action gets called again and the record
is saved more than ones in the database.
How can i handle this.
I do not want to disable the browser history.
Do we have any other solution for this.
Cendy Nguvy
Ranch Hand
Posts: 37
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
You have to use redirect="true" in forward tag.
Example :
<action path="/yourAction" type="xxx.yyy.zzz.YourAction" name="yourActionForm" scope="session" validate="true" input="/yourAction.jsp"> <forward name="success" redirect="true" path="/yourActionDone.do"/> <forward name="failure" path="/yourActionError.jsp"/> </action>
[ July 19, 2005: Message edited by: Cendy Nguvy ]
sachin jauhari
Greenhorn
Posts: 15
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
This solution did not work out. Still getting the same problem on refresh.
Merrill Higginson
Ranch Hand
Posts: 4864
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
This question is addressed in the FAQ for the Struts forum. Here is the link.
http://faq.javaranch.com/view?StrutsFaq
Merrill
Consultant,
Sima Solutions
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Can i avoid execution of action on page refresh(F5)..
Everytime i am refreshing(F5) a page the action gets called(How can i avoid?)
ServletContextAttribute Listener doesnot works with Vector object change
Cookie Problem
Struts - Capturing Browser Refresh
More...