用jsp编的上传文件页面出错:SmartUpload cannot be resolved to a type
代码是<%@pagecontentType="text/html;charset=gb2312"language="java"import="java.util.*,co...
代码是
<%@ page contentType="text/html; charset=gb2312" language="java"
import="java.util.*,com.jspsmart.upload.*" errorPage="" %>
<html>
<head>
<title></title>
</head>
<body>
<%
SmartUpload su = new SmartUpload();
su.initialize(pageContext);
su.upload();
int count=su.sava("/upload/");
out.println(count+"文件上传成功!<br>");
for(int i=0;i<su.getFiles().getCount();i++){
com.jspsmart.upload.File file=su.getFile().getFile(i);
if(file.isMissing()) continue;
out.println("<table border=1>");
out.println("</table></br>");
}
%>
</body>
</html>
An error occurred at line: 13 in the jsp file: /uploadd.jsp
The method sava(String) is undefined for the type SmartUpload
13: int count=su.sava("/upload/"); 展开
<%@ page contentType="text/html; charset=gb2312" language="java"
import="java.util.*,com.jspsmart.upload.*" errorPage="" %>
<html>
<head>
<title></title>
</head>
<body>
<%
SmartUpload su = new SmartUpload();
su.initialize(pageContext);
su.upload();
int count=su.sava("/upload/");
out.println(count+"文件上传成功!<br>");
for(int i=0;i<su.getFiles().getCount();i++){
com.jspsmart.upload.File file=su.getFile().getFile(i);
if(file.isMissing()) continue;
out.println("<table border=1>");
out.println("</table></br>");
}
%>
</body>
</html>
An error occurred at line: 13 in the jsp file: /uploadd.jsp
The method sava(String) is undefined for the type SmartUpload
13: int count=su.sava("/upload/"); 展开
3个回答
展开全部
你引用了第三方的实现包,要把这个包,也叫做jar文件放到你的lib库里
更多追问追答
追问
是这个jspSmartUpload.jar吗?
已经放进去了
追答
是的,放到web-info/lib下
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
貌似import导包导错了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询