Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
update
public int updateRgstrInfo(HttpServletRequest request) throws Exception{ String tempDir = propertiesService.getString("uploadTempDir"); String encType = "utf-8"; int maxSize = propertiesService.getInt("maxFileSize"); //10 * 1024 * 1024; // 10Mb MultipartRequest multi = null; List<Map<String,String>> paramMapArray = new ArrayList<Map<String,String>>(); //logger.debug("=========================---------- formCnt = "+request.getParameter("formCnt")); int formCnt = 3; //int formCnt = Integer.parseInt(request.getParameter("formCnt")); for(int i=0;i<formCnt;i++) paramMapArray.add(new HashMap<String,String>()); logger.debug("=========================---------- 22222"); multi = new MultipartRequest(request, tempDir, maxSize, encType,new DefaultFileRenamePolicy()); Enumeration params = multi.getParameterNames(); logger.debug("=========================---------- 33333="+params.toString()); while(params.hasMoreElements()){ String paramName = (String) params.nextElement(); //logger.debug("=========================---------- 33333 paramName="+paramName); String[] paramValues = multi.getParameterValues(paramName); logger.debug("=========================---------- 33333 :::"+paramName+"="+paramValues.length); if(paramValues.length > 1){ logger.debug("=========================---------- 333333333 :::"+paramValues+"="+paramValues.length); for(int idx=0;idx<formCnt;idx++){ paramMapArray.get(idx).put(paramName, paramValues[idx]); } } } //RgstrInfoVO rgstrInfoVO = new RgstrInfoVO(); //BeanUtils.populate(rgstrInfoVO, paramMap); logger.debug(paramMapArray.toString()); logger.debug("=========================---------- 44444"); // 참가등록정보 update int cnt = registerMapper.updateRgstrnInfo(paramMapArray); logger.debug("=========================---------- 55555"); List<RgstrAttchFileVO> rgstAttchFileArray = new ArrayList(); Enumeration files = multi.getFileNames(); while(files.hasMoreElements()){ String name = (String) files.nextElement(); String filename = multi.getFilesystemName(name); String original = multi.getOriginalFileName(name); String type = multi.getContentType(name); File f = multi.getFile(name); logger.debug("파일 피라미터 이름 : "+name); logger.debug("실제 파일 이름 : "+original); logger.debug("저장된 파일 이름 : "+filename); logger.debug("파일 타입 : "+type); if(f!=null){ // 첨부파일 정보 insert... } } return cnt; }
run
|
edit
|
history
|
help
0
merge sort by java
rd dap da
1(E)
Charles Chung
Firstproject
Simple imitation for show banners on priorities
program
codesingnal Code
continue
pk3