Hi all,

I am trying to invoke one of my Dispatch Action methods from
java script like below. I am calling that function only once but the
Dispatch Action method is executing twice. Please help me how handle this issue.

Example:-

My JavaScript function 
===============
function TestFunction(){  
            Window.open('example.do','', 'height=2000,width=300');
}

My Action Method
===============
public ActionForward Save(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
        System.out.println("CALLING TWICE::::");
      Try{
            .......
Executable code
... 
       If(request.getParameter("rowIndex") == 2){
  strForward = "successPage";
        }else{
                strForward = "failPage";
            }
        } catch (IllegalAccessException e) {
             e.printStackTrace();
         } catch (InvocationTargetException e) {
             e.printStackTrace();
         }catch(Exception e){
             e.printStackTrace();
         }
         return mapping.findForward(strForward);
    }// End of the method

 
Best Regards,
Ramesh Elkaturi,

Reply via email to