• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic