| Author |
struts
|
mantena vasu
Greenhorn
Joined: Dec 29, 2005
Posts: 1
|
|
Hi, i am new to struts. I submit the FORM from showdetails.jsp page n again i want to come back to the same page (i.e showdetails.jsp). But now when i refresh the page, again the action class (from addressbar: ...\abc.do) is calling and inserting the same record into the database. Can anybody help me plzz Tnks in Advance... - Vasu
|
 |
Aaron Ting
Ranch Hand
Joined: Dec 13, 2005
Posts: 78
|
|
Originally posted by mantena vasu: Hi, i am new to struts. I submit the FORM from showdetails.jsp page n again i want to come back to the same page (i.e showdetails.jsp). But now when i refresh the page, again the action class (from addressbar: ...\abc.do) is calling and inserting the same record into the database. Can anybody help me plzz Tnks in Advance... - Vasu
Greetings Vasu, You might want to check from your struts-config.xml file whether the scope of your action is either "request" or "session"... *Cheers*
|
If you can't convince them, confuse them!
|
 |
Periakaruppan Thiagarajan
Ranch Hand
Joined: Jul 26, 2005
Posts: 65
|
|
In Struts, refreshing the page is nothing but doing the previous request again. You can use tokens provided by struts to prevent double submission. [ December 29, 2005: Message edited by: Periakaruppan Thiagarajan ]
|
 |
Atchuta Penmatsa
Greenhorn
Joined: Feb 15, 2002
Posts: 6
|
|
Hi, Struts has a feature to prevent "duplicate form Submission". Use setToken(), checkToken() and resetToken() methods of Action class to control this behavior. Cheers, Atchuta [ December 29, 2005: Message edited by: Atchuta Penmatsa ]
|
 |
 |
|
|
subject: struts
|
|
|