0 down vote favorite
share [fb] share [tw]
i am developing a application in
struts 1.3 in struts i have a requirement that when click on the submit button of the form then the button gets disabled so as the user cannot submit the form multiple times for that i am using this code
<input value="Save" class="btnbg" type="submit" name="method"
onclick="this.disabled=true;" />
in this code on click of the button it gets disabled now it is getting disabled but i am facing a peculiar problem that action in the action class is not executing i am using DispatchAction class for execution of my action it code works fine if i remove onclick="this.disabled=true; the action gets executed but i am getting exception
javax.servlet.ServletException: Request[/AddFloor] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text.
org.apache.struts.actions.DispatchAction.unspecified(DispatchAction.java:197)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:245)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:170)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
com.asset.filter.CheckSession.doFilter(CheckSession.java:72)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)