欢迎来到天天文库
浏览记录
ID:17482377
大小:31.44 KB
页数:28页
时间:2018-09-02
《取值在下拉列表框中显示》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、取值在下拉列表框中显示验证码验证publicActionForwardexecute(ActionMappingmapping,ActionFormform,HttpServletRequestrequest,HttpServletResponseresponse){DynaValidatorFormuserForm=(DynaValidatorForm)form;//TODOAuto-generatedmethodstubActionForwardforward=null;//当用户登录时需填写验证码如不填则不能成功登录HttpSessionsession=request.getS
2、ession();Stringrand=(String)session.getAttribute("rand");Stringinput=request.getParameter("rand");UserDtoudt=newUserDto();udt.setUsername(userForm.getString("username"));udt.setPassword(userForm.getString("password"));udt.setUsertype(Integer.parseInt(userForm.get("usertype").toString()));DataSo
3、urceds=getDataSource(request,"mssql");Connectioncon=null;try{con=ds.getConnection();UserDaoud=newUserDao(con);if(ud.checkLogin(udt)){if(udt.getUsertype()==0){forward=mapping.findForward("gs");System.out.println("登录成功");System.out.println(userForm.get("username").toString());}if(udt.getUsertype(
4、)==1){forward=mapping.findForward("us");System.out.println("登录成功");System.out.println(userForm.get("username").toString());}}else{forward=mapping.findForward("loginsh");System.out.println("登录失败");}if(rand.equals(input)){System.out.println("输入相同,认证成功!");}else{forward=mapping.findForward("loginsh
5、");System.out.println("输入不同,认证失败!");}}catch(SQLExceptione){//TODOAuto-generatedcatchblocke.printStackTrace();}returnforward;}}合同信息添加ActionpublicActionForwardselect_jfbm_jfdlbm(ActionMappingmapping,ActionFormform,HttpServletRequestrequest,HttpServletResponseresponse){DynaValidatorFormcontractFor
6、m=(DynaValidatorForm)form;//TODOAuto-generatedmethodstub//通过此方法将甲方和甲方代理人信息取出并在下拉列表框中显示甲方编码和甲方代理人编码DataSourceds=getDataSource(request,"mssql");Connectioncon=null;ActionForwardforward=null;try{con=ds.getConnection();}catch(SQLExceptione){//TODOAuto-generatedcatchblocke.printStackTrace();}//将甲方编码和
7、甲方代理人编码查出来存放甲方信息的LabelValueBean//当添加合同信息时、甲方和甲方代理人用下拉列表框显示出来JfDaojd=newJfDao(con);JfdlDaojfd=newJfdlDao(con);Collectionjf=jd.jfshow();Collectionjfdl=jfd.jfdlshow();Listljf=newArrayList();Iteratoritit=jf.iterator();
此文档下载收益归作者所有