jspsmartupload Files' name is invalid or does not exist的解决方法
来源:互联网 发布:网络编辑好做吗 编辑:程序博客网 时间:2024/06/04 19:47
出现这种情况的很有可能的原因是JSP的FORM表单中没有添加ENCTYPE="multipart/form-data".
<form name="userInfo" method="post" action="first_submit.jsp" ENCTYPE="multipart/form-data">
表单标签中设置enctype="multipart/form-data"来确保匿名上载文件的正确编码。
如下:
<tr>
<td height="30" align="right">上传图片:</td>
<td><INPUT TYPE="FILE" NAME="uploadfile" SIZE="34" onChange="checkimage()"></td>
</tr>
就得加ENCTYPE="multipart/form-data"。
表单中enctype="multipart/form-data"的意思,是设置表单的MIME编码。默认情况,这个编码格式是application/x-www-form-urlencoded,不能用于文件上传;只有使用了multipart/form-data,才能完整的传递文件数据,进行下面的操作.
enctype=/"multipart/form-data/"是上传二进制数据; form里面的input的值以2进制的方式传过去。
form里面的input的值以2进制的方式传过去,所以request就得不到值了。 也就是说加了这段代码,用request就会传递不成功,
取表单值加入数据库时,用到下面的:
SmartUpload su = new SmartUpload();//新建一个SmartUpload对象
su.getRequest().getParameterValues();取数组值
su.getRequest().getParameter( );取单个参数单个值
- jspsmartupload Files' name is invalid or does not exist的解决方法
- 利用JspSmartUpload.jar上传出错:Files' name is invalid or does not exist (1205)
- 关于Files' name is invalid or does not exist的解决方法
- 紧急求救:SmartUpload 图片上传报错 Files’ name is invalid or does not exist (1205)
- Error:The type or namespace name 'Office' does not exist in the namespace 'Microsoft' 解决方法
- Invalid proguard configuration file path D:\...\proguard.cfg does not exist or is not a regular file
- Invalid proguard configuration file path D:\...\proguard.cfg does not exist or is not a regular file
- Invalid proguard configuration file path D:\...\proguard.cfg does not exist or is not a regular fil
- Invalid proguard configuration file path D:\...\proguard.cfg does not exist or is not a regular file
- does not exist or is not a readable directory
- ..\TestApp does not exist or is not a readable directory
- 解决The type or namespace name \'XXXX\' does not exist in the namespace \'XXXXXXXXX\' 的错误
- The type or namespace name 'Zhaopin' does not exist in the namespace 'LMSoft' 问题的解决
- netbean中does not exist or is not a readable错误的解决
- netbean中does not exist or is not a readable错误的解决
- Tomcat报 XXX does not exist or is not a readable directory错误时的解决办法
- tomcat的java.lang.IllegalArgumentException:Document base *** does not exist or is not a readable
- \webapps\bookstore does not exist or is not a readable directory的问题决解
- [人的十五个基本欲望]与[游戏设计]
- 串口通讯在WIN32中的应用
- http://wiki.meego.com/Image_Creation
- 项目管理入门(3)——基本原则之范围三角形
- Linux内存结构分析
- jspsmartupload Files' name is invalid or does not exist的解决方法
- 几个不错的C++皮肤控件
- asp.net(C#)实现用户浏览最新3条记录
- 判断一个数是否是4的整数次方
- emacs undo/redo
- urxvt
- Lc.exe 已退出,代码 -1
- IS_ERR()宏是什么意思
- 中断与异常