commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <mart...@apache.org>
Subject Re: Can I use commons-fileUpload with Tomcat Embedded?
Date Thu, 17 May 2007 21:16:25 GMT
Without seeing any of your code, and with no Commons FileUpload classes in
the call stack, frankly I don't have a clue. But I will say that using
FileUpload from within a JSP is not recommended. You should use a servlet
for that instead.

--
Martin Cooper


On 5/17/07, risky57 <risky57@hotmail.com> wrote:
>
>
> im trying to upload a file using jsp.
>
> a flash application is sending a http post multipart upload to the jsp.
>
> i cant seem to get the thing to work.
>
> when i remove the added code for the commons-fileupload, the jsp runs.
> when
> i put the code in as described on  jakarta website, i get the error
> outlined
> below. does anyone have any ideas or suggestions.
>
> your help is appriciated.thank you.
>
>
>
> The Error:
> java.lang.NullPointerException
>         at
> org.apache.catalina.loader.WebappClassLoader.findResourceInternal(
> WebappClassLoader.java:1995)
>         at
> org.apache.catalina.loader.WebappClassLoader.findResource(
> WebappClassLoader.java:933)
>         at
> org.apache.catalina.loader.WebappClassLoader.getResourceAsStream(
> WebappClassLoader.java:1154)
>         at
> org.apache.jasper.servlet.JasperLoader.getResourceAsStream(
> JasperLoader.java:144)
>         at org.apache.jasper.compiler.JDTCompiler$1.isPackage(
> JDTCompiler.java:234)
>         at org.apache.jasper.compiler.JDTCompiler$1.isPackage(
> JDTCompiler.java:259)
>         at
> org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.isPackage(
> LookupEnvironment.java:948)
>         at
> org.eclipse.jdt.internal.compiler.lookup.PackageBinding.findPackage(
> PackageBinding.java:75)
>         at
> org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(
> PackageBinding.java:190)
>         at
> org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findImport(
> CompilationUnitScope.java:415)
>         at
>
> org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.checkAndSetImports
> (CompilationUnitScope.java:167)
>         at
>
> org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings
> (LookupEnvironment.java:190)
>         at
> org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java
> :301)
>         at org.eclipse.jdt.internal.compiler.Compiler.compile(
> Compiler.java:315)
>         at
> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:425)
>         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
>         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
>         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
>         at
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java
> :564)
>         at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
> :299)
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(
> JspServlet.java:315)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java
> :265)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:269)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:188)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:210)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:174)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :127)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :117)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:108)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
> :151)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
>         at
>
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
> (Http11BaseProtocol.java:665)
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
> PoolTcpEndpoint.java:528)
>         at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
> LeaderFollowerWorkerThread.java:81)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:685)
>         at java.lang.Thread.run(Thread.java:613)
> May 17, 2007 4:54:48 PM org.apache.catalina.core.StandardWrapperValveinvoke
> SEVERE: Servlet.service() for servlet jsp threw exception
> java.lang.NullPointerException
>         at
> org.apache.catalina.loader.WebappClassLoader.findResourceInternal(
> WebappClassLoader.java:1995)
>         at
> org.apache.catalina.loader.WebappClassLoader.findResource(
> WebappClassLoader.java:933)
>         at
> org.apache.catalina.loader.WebappClassLoader.getResourceAsStream(
> WebappClassLoader.java:1154)
>         at
> org.apache.jasper.servlet.JasperLoader.getResourceAsStream(
> JasperLoader.java:144)
>         at org.apache.jasper.compiler.JDTCompiler$1.isPackage(
> JDTCompiler.java:234)
>         at org.apache.jasper.compiler.JDTCompiler$1.isPackage(
> JDTCompiler.java:259)
>         at
> org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.isPackage(
> LookupEnvironment.java:948)
>         at
> org.eclipse.jdt.internal.compiler.lookup.PackageBinding.findPackage(
> PackageBinding.java:75)
>         at
> org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(
> PackageBinding.java:190)
>         at
> org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findImport(
> CompilationUnitScope.java:415)
>         at
>
> org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.checkAndSetImports
> (CompilationUnitScope.java:167)
>         at
>
> org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings
> (LookupEnvironment.java:190)
>         at
> org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java
> :301)
>         at org.eclipse.jdt.internal.compiler.Compiler.compile(
> Compiler.java:315)
>         at
> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:425)
>         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
>         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
>         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
>         at
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java
> :564)
>         at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
> :299)
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(
> JspServlet.java:315)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java
> :265)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:269)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:188)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:210)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:174)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :127)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :117)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(
> StandardEngineValve.java:108)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
> :151)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
>         at
>
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
> (Http11BaseProtocol.java:665)
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
> PoolTcpEndpoint.java:528)
>         at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
> LeaderFollowerWorkerThread.java:81)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:685)
>         at java.lang.Thread.run(Thread.java:613)
> --
> View this message in context:
> http://www.nabble.com/Can-I-use-commons-fileUpload-with-Tomcat-Embedded--tf3774339.html#a10672228
> Sent from the Commons - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message