利用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) 展开
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) 展开
2个回答
展开全部
你好像没有在Myeclipse中引入jspsmartupload.jar包吧,或者是那个包缺少文件,你可以去官网重新下一个
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询