文件名称:jspSmartUpload上传下载
文件大小:48KB
文件格式:DOC
更新时间:2015-11-05 13:21:41
SmartUpload
<form action="add_do.jsp" name="formlft" method="post" ENCTYPE="multipart/form-data" check(this)">
date: | <input type="text" name="checkdate" size="12" readonly=true></td> | type: | Record: |
No. | ID | Reason | Remark | Status | op | |
1 | <input type="text" name="id1" size="8"></TD> | <textarea name="reason1" rows="3" cols="14" ></textarea> | <textarea name="remark1" rows="3" cols="14" ></textarea> | <textarea name="op1" rows="3" cols="10" ></textarea> | <input type="file" name="file1" size="10" ></TD> | |
2 | <input type="text" name="id2" size="8"></TD> | <textarea name="reason2" rows="3" cols="14"></textarea> | <textarea name="remark2" rows="3" cols="14"></textarea> | <textarea name="op2" rows="3" cols="10"></textarea> | <input type="file" name="file2" size="10" ></TD> | |
3 | <input type="text" name="id3" size="8"></TD> | <textarea name="reason3" rows="3" cols="14"></textarea> | <textarea name="remark3" rows="3" cols="14"></textarea> | <textarea name="op3" rows="3" cols="10"></textarea> | <input type="file" name="file2" size="10" ></TD> | |
上传附件: | <input type="file" class="bginput" name="attachment_array[]"></td> |
<input type="submit" name="Submit" value="提交"></td> | <input type="reset" name="reset" value="重置"></td> |
"); String attachsourcename=""; String newfilename=""; String save=""; for (int j=0;j
"); //out.println(agvid); } Class.forName("oracle.jdbc.driver.OracleDriver").newInstance(); String url = "jdbc:oracle:thin:@10.20.32.87:1521:XMCSHIS"; String user = "michelle"; String password = "michelle"; Connection conn = DriverManager.getConnection(url, user, password); Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); try{ for(int i=1;i<=3;i++){ String checkdate=su.getRequest().getParameter("checkdate"); String csttype=su.getRequest().getParameter("csttype"); String cstid=su.getRequest().getParameter("" + "cstid"+i + ""); String reason=su.getRequest().getParameter("" + "reason"+i + ""); String remark=su.getRequest().getParameter("" + "remark"+i + ""); String status=su.getRequest().getParameter("" + "status"+i + ""); String op=su.getRequest().getParameter("" + "op"+i + ""); String reporter=su.getRequest().getParameter("reporter"); if(cstid.equals("")) {break;} String SQL="insert into michelle.Table1(checkdate ,type ,id,reason ,op ,remark ,attachsourcename ,newfilename ,reporter ,status )" +" values('"+checkdate+"','"+type+"',UPPER('"+id+"'),'"+reason+"','"+op+"','"+remark+"','"+attachsourcename+"','"+newfilename+"','"+reporter+"','"+status+"')"; //out.print(SQL); //out.println(11144); //stmt.executeUpdate(SQL); } out.println("
"+ex.getMessage()+"
返回上一页