我想在JSP页面上单击Button后从Oracle数据库调用存储过程。
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","system","manager");
Statement stmt=con.createStatement();
CallableStatement cstmt=con.prepareCall("{call ?:=addProduct(?,?,?,?,?)}");
cstmt.registerOutParameter(1, Types.INTEGER);
cstmt.setInt(2,Integer.parseInt(tPid.getText()));
cstmt.setString(3,tPt.getText());
cstmt.setString(4,tPn.getText());
cstmt.setInt(5,Integer.parseInt(tPq.getText()));
cstmt.setInt(6,Integer.parseInt(tPp.getText()));
cstmt.executeUpdate();
如何在BSPTON单击上运行此代码,而不是在JSP页面上单击“提交”按钮?