首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

jsp运用SmartUpload上传组件的有关问题,请高手帮帮忙!

2012-01-01 
jsp运用SmartUpload上传组件的问题,急啊,请高手帮帮忙!!!%...SmartUploadsunewSmartUpload()com.jspsma

jsp运用SmartUpload上传组件的问题,急啊,请高手帮帮忙!!!
<%               ...
SmartUpload   su   =   new   SmartUpload();
com.jspsmart.upload.File   file;
su.initialize(pageContext);
su.setMaxFileSize(10000000);
su.setTotalMaxFileSize(51200000);
su.setAllowedFilesList( " ")                   su.setDeniedFilesList( " ");
su.upload();
%>
前段时间还可以上传,今天在试,出现了如下错误

An   error   occurred   at   line:   27   in   the   jsp   file:   /manage/do_upload.jsp
Generated   servlet   error:
SmartUpload   cannot   be   resolved   to   a   type

An   error   occurred   at   line:   27   in   the   jsp   file:   /manage/do_upload.jsp
Generated   servlet   error:
SmartUpload   cannot   be   resolved   to   a   type

An   error   occurred   at   line:   27   in   the   jsp   file:   /manage/do_upload.jsp
Generated   servlet   error:
com.jspsmart.upload.File   cannot   be   resolved   to   a   type

我以为是没找到该组件,可是于是在代码开头补上
<%@   page   contentType= "text/html;charset=gb2312 "   %>
...
<%@   page   import= "com.jspsmart.upload.* "   %>   //补上
可是还是出现同样的错误,以前上传的时候不要添加的,奇怪了.

[解决办法]
把SmartUpload.jar 放到web-inf/lib里面就可以

热点排行