日期:2014-05-18  浏览次数:20680 次

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里面就可以