jspSmartUpload出错的问题??急!急!急! 20

想使用jspSmartUpload实现文件上传。jdk、tomcat配置正常,jspSmartUpload.jar包已放到class下,可是提交就是出错!望大虾帮忙!!感... 想使用jspSmartUpload实现文件上传。jdk、tomcat配置正常,jspSmartUpload.jar包已放到class下,可是提交就是出错!望大虾帮忙!!感激!!
不知道要不要重新配置web.xml的?
错误:
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

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

An error occurred at line: 5 in the jsp file: /upload.jsp
Generated servlet error:
Syntax error, insert "AssignmentOperator ArrayInitializer" to complete ArrayInitializerAssignement

An error occurred at line: 5 in the jsp file: /upload.jsp
Generated servlet error:
Syntax error, insert ";" to complete Statement

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

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

An error occurred at line: 5 in the jsp file: /upload.jsp
Generated servlet error:
Syntax error, insert "AssignmentOperator ArrayInitializer" to complete ArrayInitializerAssignement

An error occurred at line: 5 in the jsp file: /upload.jsp
Generated servlet error:
Syntax error, insert ";" to complete Statement

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
错误是说添加AssignmentOperator ArrayInitializer完成初始化,可是我初始化没错的吧:
SmartUpload su=new SmartUpload();
su.initialize(pageContext);
还说我少了“;”,可是我看了好几遍也没有少啊~晕了
展开
 我来答
Only丶小轩
2008-12-11 · TA获得超过423个赞
知道答主
回答量:130
采纳率:0%
帮助的人:0
展开全部
这个问题应该是由于jspSmartUpload包不对..应该将classes中的com文件夹,servletUpload.class和servletUpload.java三个文件一起打包..具体操作如下:
jar cvf MyjspSmartUpload.jar com servletUpload.class servletUpload.java 。然后将MyjspSmartUpload.jar放在tomcat的common/lib中,如果用的是eclipse+myeclipse,可以直接操作,将这个架包引入到自己站点的WebRoot\WEB-INF\lib中。
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

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

类别

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

说明

0/200

提交
取消

辅 助

模 式