已经建立了一个SSH架构的站点。(Struts 1.3)
现在想加入AJAX。遇到问题如下:
原有界面是发送a.do,同时对应的form如下 <form action="a.do" method="post" enctype="multipart/form-data" id="uploadfileform"> <input type="file" name="formfile" id="file">
<input type="comit" value="执行" id="btn_exe" >
<input type="hidden" name="location" id="hid_location"> </form> 现在采用AJAX发送异步请求,该怎么写呢? 我的写法是:
var formfileval = $("#fileuolodchange").val();
var locationval = $("#hid_location").val();
$.ajax({
type: "POST",
url: "a.do",
data: "formfile=formfileval&location=locationval",
dataType:"html",
success: function(data){
.......
}
}); 后台直接报严重: Servlet.service() for servlet action threw exception
java.lang.IllegalArgumentException: argument type mismatch
请问该怎么写呢?多谢!
现在想加入AJAX。遇到问题如下:
原有界面是发送a.do,同时对应的form如下 <form action="a.do" method="post" enctype="multipart/form-data" id="uploadfileform"> <input type="file" name="formfile" id="file">
<input type="comit" value="执行" id="btn_exe" >
<input type="hidden" name="location" id="hid_location"> </form> 现在采用AJAX发送异步请求,该怎么写呢? 我的写法是:
var formfileval = $("#fileuolodchange").val();
var locationval = $("#hid_location").val();
$.ajax({
type: "POST",
url: "a.do",
data: "formfile=formfileval&location=locationval",
dataType:"html",
success: function(data){
.......
}
}); 后台直接报严重: Servlet.service() for servlet action threw exception
java.lang.IllegalArgumentException: argument type mismatch
请问该怎么写呢?多谢!
断点调试,