jQuery上传插件可与JSP/Java一起使用 [英] jQuery upload plugin to work with JSP/Java

查看:92
本文介绍了jQuery上传插件可与JSP/Java一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试完成以下任务:

I'm trying to accomplish the following:

通过向JSP操作提交表单(编码类型:multipart/form-data)将文件上传至应用程序,该操作处理其余操作(包括将文件写入磁盘,处理并返回有关上传的一些xml数据).

Upload a file to the application by submitting a form (enctype: multipart/form-data) to a JSP action which handles the rest (including writing the file to the disk, processing and returning some xml data about the upload).

直到最近,我一直在使用此插件: http://valums.com/ajax-upload/

Until recently, I was using this plugin: http://valums.com/ajax-upload/

这不能很好地工作,原因有两个:

This does not work well for two reasons:

  • 它在Internet Explorer上中断
  • 代码是用一半的jquery,一半的本机javascript编写的,而不是以通常的插件编写形式编写的,这使得调试变得更加困难.

我还查看了Uploadify( http://www.uploadify.com/),但是它采用了截然不同的方法,需要进行很多后端更改.

I've also looked at Uploadify ( http://www.uploadify.com/ ) but it takes a radically different approach which would require a lot of back-end changes.

您知道其他任何与清洁器/跨浏览器兼容的类似的在隐藏的iframe中提交表单"插件吗?还是我所缺少的替代解决方案?

Do you know any similar submit-form-in-hidden-iframe plugins that are cleaner / cross-browser compatible? Or alternative solutions that I'm missing?

请注意,由于特殊要求,我不能使用常规奶粉.

Please note that I can't use a regular because of the specific requirements.

谢谢.

推荐答案

您可以尝试:

https://github.com/blueimp/jQuery-File-Up

非常好&简单

这篇关于jQuery上传插件可与JSP/Java一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆