jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes Inserting a record in Database after refreshing a page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Inserting a record in Database after refreshing a page" Watch "Inserting a record in Database after refreshing a page" New topic
Author

Inserting a record in Database after refreshing a page

RiyazAhmed Shaikh
Greenhorn

Joined: Jul 05, 2006
Posts: 1
Hi all,
Please help in solving this problem,

I am using struts and oracle in my application.
After entering a new record in DB through a UI,I am showing a view page which display all the record's.
If i press refresh this page then it is again inserting a value in database.
I dont know why it is inserting a record in DB when I am trying to refresh a page.
I think forming is submiting while refreshing a page .

Please help in solving this problem.

Thanx In Advance

Shaikh
Dom Lassy
Ranch Hand

Joined: May 05, 2006
Posts: 181
You are probably resubmitting the form. Struts has a transaction token built in that could solve your problem, or after the original submittal the success page could be a page that uses html to forward to another page.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The answer to this question can be found in theJavaRanch Struts FAQ


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inserting a record in Database after refreshing a page
 
Similar Threads
problems in refreshing a Frame window after any event
jsp include:
REFRESH A JSP PAGE
Page not refreshing
Refreshing JSP Page