本人正在做用jspSmartUpload上传文件,但不知道jspSmartUpload.jar该防在什么位置,该怎么用?程序编译出现这样的错误是怎么回事呢?请指教下小弟,万分的感谢!!!
An error occurred at line: 7 in the jsp file: /do_upload.jsp
Generated servlet error:
smartupload cannot be resolved to a type
An error occurred at line: 7 in the jsp file: /do_upload.jsp
Generated servlet error:
smartupload cannot be resolved to a type
An error occurred at line: 7 in the jsp file: /do_upload.jsp
Generated servlet error:
com.jspsmart.upload.File cannot be resolved to a type
An error occurred at line: 7 in the jsp file: /do_upload.jsp
Generated servlet error:
myFile cannot be resolved
An error occurred at line: 7 in the jsp file: /do_upload.jsp
Generated servlet error:
myFile cannot be resolved
An error occurred at line: 7 in the jsp file: /do_upload.jsp
Generated servlet error:
myFile cannot be resolved
------解决方案--------------------
放到你工程目录下的WEB_INF/lib 下
这个你不会不知道吧
------解决方案--------------------
按ls的办法做先
------解决方案--------------------
1、放你的工程目录下面的WEB-INF/lib
2、把它的classes文件解压出来,直接放到WEB-INF/classes/目录下
------解决方案--------------------
放你的工程目录下面的WEB-INF/lib
String uploadPath =sm.getEmailConfig( "uploadPath ");
File testdir = new File(uploadPath); //为了保证目录存在,如果没有则新建该目录
if (!testdir.exists()) {
testdir.mkdirs();
}
DiskFileUpload fu = new DiskFileUpload();
// 设置最大文件尺寸,这里是4MB
fu.setSizeMax(50194304);
// 设置缓冲区大小,这里是50kb
fu.setSizeThreshold(14096);
// 得到所有的文件:
List fileItems = fu.parseRequest(request);
FileItem file_item;
for(int i=0;i <fileItems.size();i++)
{
file_item=(FileItem)fileItems.get(i);
}
Iterator i = fileItems.iterator();
// 依次处理每一个文件:
String EmailTitle=null;
String Emailcctem=null;
List ToEmaillist=new ArrayList();
List ToCCEmail=new ArrayList();
List Urllist =new ArrayList();
while (i.hasNext()) {
FileItem fi = (FileItem) i.next();
// 检查当前的项目是普通的表单元素,还是一个上载的文件
if (fi.isFormField()) {
// 获得表单域的名字
if (fi.getFieldName().equals( "QU_BJDSDEM.ReceiveEmail "))
{
String ToEmail =fi.getString();
String[] tt = st.split(ToEmail, "; ");
for(int j=0;j <tt.length;j++)
{
ToEmaillist.add(tt[j]);
}