Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery Ajax Post submitting form multiple times
    primarykey
    data
    text
    <p>We have a jsp form, which on a Button Click is submitted to a Struts2 Action Class. From the Action Class, the control flows to a Service (java) class and to a DAO (Java iBatis) class. The DAO class invokes a oracle pl/sql procedure.</p> <p><strong>Problem:</strong></p> <p>Reviewing the log statements in Action/Service/DAO &amp; PL/SQL procedure shows that they are being invoked 2/3 times on a single button click. The number of times it executes is quite random, but it's never once (only in code deployed in Staging server).</p> <p><em><strong>Strangely, this functionality works fine (invoked only once) when our code is deployed in our Development &amp; Production servers (Websphere 7.1)</em></strong>. The exact same code (EAR) when deployed in our Staging server is facing this multiple submit error. </p> <p>We tried from various browsers (IE 8 &amp; IE 9) and this issue occurs only when we try accessing the application deployed in our staging server.</p> <p>all our Development, Staging &amp; Production Websphere server is of same version &amp; patch level.</p> <p>Here is our javascript code used to submit.</p> <pre><code> $(document).ready(function() { mask(); var config = "${returnedCString}"; var f = "${flagS}"; if (f == "1"){ $.post('&lt;%=request.getContextPath()%&gt;/applyComp' ,function(data){ unmask(); $("#impactForm").attr('action','&lt;%=request.getContextPath()%&gt;/CompareForm'); $("#impactForm").submit(); } ); } } </code></pre> <p>The problem is that POST to the following Struts Action is what is happening multiple times</p> <pre><code>$.post('&lt;%=request.getContextPath()%&gt;/applyComp' </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload