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);
还说我少了“;”,可是我看了好几遍也没有少啊~晕了 展开
不知道要不要重新配置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);
还说我少了“;”,可是我看了好几遍也没有少啊~晕了 展开
1个回答
展开全部
这个问题应该是由于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中。
jar cvf MyjspSmartUpload.jar com servletUpload.class servletUpload.java 。然后将MyjspSmartUpload.jar放在tomcat的common/lib中,如果用的是eclipse+myeclipse,可以直接操作,将这个架包引入到自己站点的WebRoot\WEB-INF\lib中。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询