利用jspsmartupload上传下载文件时的问题: The server encountered an internal error () that prevented 10

我是将jspsmartupload.jar文件直接放在工程的WEN-INF的lib目录下的,我也试过直接放在tomcat的lib目录下,但还是不行,求高手指点!!!org... 我是将jspsmartupload.jar文件直接放在工程的WEN-INF的lib目录下的,我也试过直接放在tomcat的lib目录下,但还是不行,求高手指点!!!

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 12 in the jsp file: /WebRoot/uploadfile.jsp
SmartUpload cannot be resolved to a type
9: </head>
10: <body>
11: <%
12: SmartUpload mySmartUpload =new SmartUpload();
13: long file_size_max=400000;
14: String ext="";
15: String url="upload/"; //应保证在根目录中有此目录的存在(也就是说需要自己建立相应的文件夹)

An error occurred at line: 12 in the jsp file: /WebRoot/uploadfile.jsp
SmartUpload cannot be resolved to a type
9: </head>
10: <body>
11: <%
12: SmartUpload mySmartUpload =new SmartUpload();
13: long file_size_max=400000;
14: String ext="";
15: String url="upload/"; //应保证在根目录中有此目录的存在(也就是说需要自己建立相应的文件夹)

An error occurred at line: 30 in the jsp file: /WebRoot/uploadfile.jsp
com.jspsmart.upload.File cannot be resolved to a type
27: <%
28: }
29: try{
30: com.jspsmart.upload.File myFile = mySmartUpload.getFiles().getFile(0);
31: if (myFile.isMissing()){%>
32: <SCRIPT language="javascript">
33: alert("请先选择要上传的文件");

An error occurred at line: 48 in the jsp file: /WebRoot/uploadfile.jsp
SmartUpload.SAVE_VIRTUAL cannot be resolved to a type
45: //String filename = String.valueOf(calendar.getTimeInMillis());
46: saveurl=application.getRealPath("/")+url;
47: saveurl=saveurl+filename+"."+ext; //保存路径
48: myFile.saveAs(saveurl,SmartUpload.SAVE_VIRTUAL);
49: out.print(saveurl);
50:
51: //String ret = "parent.HtmlEdit.focus();";

Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
展开
 我来答
阿加墨
2012-04-06
知道答主
回答量:71
采纳率:0%
帮助的人:29万
展开全部
你好像没有在Myeclipse中引入jspsmartupload.jar包吧,或者是那个包缺少文件,你可以去官网重新下一个
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
白首功名
2012-03-30 · TA获得超过153个赞
知道小有建树答主
回答量:131
采纳率:100%
帮助的人:97.5万
展开全部
"xxx cannot be resolved to a type"
这个信息是说你没有import该类,在jsp的开头几行写<%@page import="xx.xx.XXX" %>
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式