jsp:
$('#myForm').ajaxSubmit({});
<form action="" name="myForm" id="myForm" method="post" enctype="multipart/form-data">
<input type="file" name="upload_file" id="upload_file" />
</form>
java:
@At
@AdaptBy(type = UploadAdaptor.class, args = { "${app.root}/WEB-INF/tmp" })
public String update(@Param("upload_file")TempFile f, HttpServletRequest request)
当选择文件时上传正常,不选择文件时有报错,报类转换异常,看下面回复图片