服务器端代码如下:
public void uploadFile(){
System.out.println("----------begin upload file------------");
String saveDirectory="c:\\";
UploadFile uf=getFile("pFile");
System.out.println("----------end upload file------------");
// System.out.println(uf.getFileName());
}
前端uploadFile.jsp 如下 :
<form id="form1" action="uploadFile" method="post" enctype="multipart/form-data" >
<input type="file" id="idFile" name="pFile"></input>
<input type="submit" value="上传">
</form>
肥皂起泡泡
慕容708150