Results 1 to 4 of 4
  1. #1
    Swapnika_M is offline Member
    Join Date
    Apr 2014
    Posts
    1
    Rep Power
    0

    Default Struts2 Issue - Multiple Form Submits due to Browser Refresh

    Hi,

    I have a UI page where we enter few values subject and message and click on Add Message button and the form gets submitted. The user is clicking on browser refresh (F5)continuously which is causing multiple form submits and the same message gets displayed again and again. Please provide pointers/links as to how can I resolve this.

    Appreciate your help.

    Thanks,
    Swapnika.

  2. #2
    makpandian's Avatar
    makpandian is offline Senior Member
    Join Date
    Dec 2008
    Location
    Chennai
    Posts
    450
    Rep Power
    7

    Default Re: Struts2 Issue - Multiple Form Submits due to Browser Refresh

    Hi,

    You can block browser refresh in UI itself by using either Jquery or plain Java script.
    Mak
    (Living @ Virtual World)

  3. #3
    manjusha is offline Member
    Join Date
    Jul 2014
    Posts
    3
    Rep Power
    0

    Default Re: Struts2 Issue - Multiple Form Submits due to Browser Refresh

    Are you using ajax or direct form submit ?
    when you click on Add Message button the url in your page gets changed. So that when to refresh form gets submitted multiple times.
    We can also redirect the url to the main page after clicking on the button so that when to refresh the page form wont be submitted.
    Last edited by manjusha; 07-23-2014 at 09:19 AM.

  4. #4
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    843
    Rep Power
    6

Similar Threads

  1. Struts2-jQuery Issue
    By cantwait in forum Struts
    Replies: 2
    Last Post: 05-16-2012, 05:59 PM
  2. Browser's back button refresh the pages
    By hasansheikh18 in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 05-31-2011, 05:44 PM
  3. Why the web browser needs to refresh first so that creating table may work? Pls help.
    By MarkSquall in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 03-29-2010, 12:14 PM
  4. Struts2 display tag Issue
    By nickraj in forum Web Frameworks
    Replies: 0
    Last Post: 02-26-2009, 07:03 PM
  5. Struts2 :File upload and div on same form
    By saqib in forum Web Frameworks
    Replies: 2
    Last Post: 08-19-2008, 12:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •