hi,I just write like the example, my servlet have receive the upload file and wirte to the disk successfuly.but after i upload the file,it says unexpected server response.here is my script and html code:
<script type="text/javascript">
function onSuccess(e) {
var window = $("#message").data("kendoWindow");
window.center();
window.open();
window.content(e.response);
}
$(document).ready(function() {
$("#message").kendoWindow({
visible : false,
width : "400px",
height : "200px",
draggable : false
});
$("#headImg").kendoUpload({
multiple : false,
async : {
saveUrl:"${pageContext.request.contextPath}/doUpLoadHeadImg",
saveField:"headImg",
success : onSuccess
}
});
});
</script>
<input type="file" id="headImg" name="headImg" />
<script type="text/javascript">
function onSuccess(e) {
var window = $("#message").data("kendoWindow");
window.center();
window.open();
window.content(e.response);
}
$(document).ready(function() {
$("#message").kendoWindow({
visible : false,
width : "400px",
height : "200px",
draggable : false
});
$("#headImg").kendoUpload({
multiple : false,
async : {
saveUrl:"${pageContext.request.contextPath}/doUpLoadHeadImg",
saveField:"headImg",
success : onSuccess
}
});
});
</script>
<input type="file" id="headImg" name="headImg" />