jsp SmartUpload 上传文件出错
报错代码如下:org.apache.jasper.JasperException:UnabletocompileclassforJSP:Anerroroccurredat...
报错代码如下:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 11 in the jsp file: /web/do_upload.jsp
com.jspsmart.upload.SmartUpload cannot be resolved to a type
8: try
9: {
10: String myFileName="";
11: com.jspsmart.upload.SmartUpload mySmartUpload = new com.jspsmart.upload.SmartUpload();
12: mySmartUpload.initialize(pageContext);
13: mySmartUpload.setMaxFileSize(500*1024*1024);
14: mySmartUpload.upload();
An error occurred at line: 11 in the jsp file: /web/do_upload.jsp
com.jspsmart.upload.SmartUpload cannot be resolved to a type
8: try
9: {
10: String myFileName="";
11: com.jspsmart.upload.SmartUpload mySmartUpload = new com.jspsmart.upload.SmartUpload();
12: mySmartUpload.initialize(pageContext);
13: mySmartUpload.setMaxFileSize(500*1024*1024);
14: mySmartUpload.upload();
An error occurred at line: 16 in the jsp file: /web/do_upload.jsp
com.jspsmart.upload.File cannot be resolved to a type
13: mySmartUpload.setMaxFileSize(500*1024*1024);
14: mySmartUpload.upload();
15: for (int i=0;i<mySmartUpload.getFiles().getCount();i++){
16: com.jspsmart.upload.File myFile=mySmartUpload.getFiles().getFile(i);
17: if (!myFile.isMissing())
18: {
19: myFileName=myFile.getFileName();
求各位大神解答,感激不尽 展开
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 11 in the jsp file: /web/do_upload.jsp
com.jspsmart.upload.SmartUpload cannot be resolved to a type
8: try
9: {
10: String myFileName="";
11: com.jspsmart.upload.SmartUpload mySmartUpload = new com.jspsmart.upload.SmartUpload();
12: mySmartUpload.initialize(pageContext);
13: mySmartUpload.setMaxFileSize(500*1024*1024);
14: mySmartUpload.upload();
An error occurred at line: 11 in the jsp file: /web/do_upload.jsp
com.jspsmart.upload.SmartUpload cannot be resolved to a type
8: try
9: {
10: String myFileName="";
11: com.jspsmart.upload.SmartUpload mySmartUpload = new com.jspsmart.upload.SmartUpload();
12: mySmartUpload.initialize(pageContext);
13: mySmartUpload.setMaxFileSize(500*1024*1024);
14: mySmartUpload.upload();
An error occurred at line: 16 in the jsp file: /web/do_upload.jsp
com.jspsmart.upload.File cannot be resolved to a type
13: mySmartUpload.setMaxFileSize(500*1024*1024);
14: mySmartUpload.upload();
15: for (int i=0;i<mySmartUpload.getFiles().getCount();i++){
16: com.jspsmart.upload.File myFile=mySmartUpload.getFiles().getFile(i);
17: if (!myFile.isMissing())
18: {
19: myFileName=myFile.getFileName();
求各位大神解答,感激不尽 展开
2个回答
展开全部
看一下前台jsp的form表单有没有加enctype="multipart/form-data"
<form action="upload.action" method="post" enctype="multipart/form-data">
<form action="upload.action" method="post" enctype="multipart/form-data">
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询