Forums Register Login

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

+Pie Number of slices to send: Send
Hi,

I am uploading multiple files using org.apache.commons.fileupload.servlet.ServletFileUpload type. When I uploading multiplefiles I got to following Exception. Can any body please help.

Unable to compile class for JSP

Generated servlet error:
Only a type can be imported. org.apache.commons.fileupload.servlet.ServletFileUpload resolves to a package

Generated servlet error:
Only a type can be imported. org.apache.commons.fileupload.disk.DiskFileItemFactory resolves to a package

An error occurred at line: 10 in the jsp file: /multi.jsp
Generated servlet error:
ServletFileUpload cannot be resolved

An error occurred at line: 10 in the jsp file: /multi.jsp
Generated servlet error:
FileItemFactory cannot be resolved to a type

An error occurred at line: 10 in the jsp file: /multi.jsp
Generated servlet error:
DiskFileItemFactory cannot be resolved to a type

An error occurred at line: 10 in the jsp file: /multi.jsp
Generated servlet error:
ServletFileUpload cannot be resolved to a type

An error occurred at line: 10 in the jsp file: /multi.jsp
Generated servlet error:
ServletFileUpload cannot be resolved to a type

An error occurred at line: 10 in the jsp file: /multi.jsp
Generated servlet error:
FileUploadException cannot be resolved to a type

An error occurred at line: 10 in the jsp file: /multi.jsp
Generated servlet error:
e cannot be resolved

An error occurred at line: 10 in the jsp file: /multi.jsp
Generated servlet error:
FileItem cannot be resolved to a type

An error occurred at line: 10 in the jsp file: /multi.jsp
Generated servlet error:
FileItem cannot be resolved to a type


at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)

Thanks &Regards
Bhaskar
They gave me pumpkin ice cream. It was not pumpkin pie ice cream. Wiping my tongue on this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 3284 times.
Similar Threads
problem in custom tag library
Can't deploy code for taglibs on Tomcat 5.5
Upload and Download files just like attachments in JSP
Problem loading the class
unable to compile class for JSP
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:24:59.