jsp页面的部分代码
struts.xml 拦截器等配置少不了/images /image/bmp,image/png,image/gif,image/jpeg,image/jpg,image/x-png, image/pjpeg 1024102400 cpaction MyJsp.jsp
//文件上传产品信息上传 private File[] attach; private String[] attachFileName; private String[] attachContentType; private String savePath; public String insertcp() throws Exception{ ServletActionContext.getRequest().setCharacterEncoding("UTF-8"); //获取数组 File[] file=getAttach(); if(file.length>0 && file!=null){ for(int i=0;i0) { fos.write(by,0,len); } fos.close(); fis.close(); } } }