view부분을 struts-html 를 사용하지 않고 다중 업로드를 처리하는 편법..
2009.8.1 yang.nam.seok
-------jsp--inputview--------------------------------------------------------
<input type="file" name="file[0]" />
<input type="file" name="file[1]" />
-------actionform--------------------------------------------------------
private Vector<FormFile> filelist = new Vector<FormFile>();
public FormFile getFile(int i) {
return (FormFile)filelist.elementAt(i);
}
public void setFile(int i,FormFile f) {
if(!f.toString().equals(""))filelist.addElement(f);
}
public int getfilelist()
{
return filelist.size();
}
public void reset(ActionMapping map, HttpServletRequest request)
{
filelist.removeAllElements();
}
-----actionform-----------------------------------------------------
for(int i=0;i<af.getfilelist();i++) //파일업 테스트
{
System.out.println("Size:"+af.getfilelist());
String name=FileSave.saveFile(this,af.getFile(i)).getRealName();
}
댓글 없음:
댓글 쓰기