首页 新闻 会员 周边

jsp页面调用存储过程

0
悬赏园豆:10 [已关闭问题] 关闭于 2016-04-25 15:12

public String getProc(String[] pStrs, String[] vStrs, int[] types,boolean[] inOuts,String string) {
String[] pStrs1={"ny","unitCode","ywh","unitName","zf","mxfs","v_message","v_result"};
String[] vStrs1={ny,unitCode,ywh,unitName,zf,mxfs,"",""};
int[] types1={Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,Types.VARCHAR};
boolean[] inOuts1={true,true,true,true,true,true,false,false};
return this.getProc(pStrs1, vStrs1, types1, inOuts1,"P_jxqktjb");
}这是在controller写好的调用存储过程的方法 jdbc也配好了  怎么把这个方法写到jsp页面上的button按钮上 (就是在页面的input框中输入相应的ny年月点击button按钮调用存储方法生成相应的数据 )

wtu文的主页 wtu文 | 初学一级 | 园豆:161
提问于:2016-04-22 14:36
< >
分享
所有回答(1)
0

在服务器端写好,直接传到页面不就好了吗?

phil_jing | 园豆:209 (菜鸟二级) | 2016-04-22 14:49

@wtu文: 写个ajax

支持(0) 反对(0) phil_jing | 园豆:209 (菜鸟二级) | 2016-04-22 15:00

输入时间之后直接ajax后台请求,然后执行存储过程之后返回一个结果,然后根据这个结果来实现你想要的

支持(0) 反对(0) phil_jing | 园豆:209 (菜鸟二级) | 2016-04-22 15:25
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册