commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <mart...@apache.org>
Subject Re: The request doesn't contain a multipart/form-data or multipart/mixed stream, con
Date Thu, 08 May 2003 21:47:22 GMT
I'm guessing that the request has already been consumed by the time you are
calling parseRequest(), quite possibly because the container parsed it
before invoking your JSP page.

Note that it is really not a good idea to use FileUpload from a JSP page.
It's certainly not intended to be used that way. You should be using it
inside a regular servlet instead.

--
Martin Cooper


"Jorge Alzati" <j_alzati@hotmail.com> wrote in message
news:BAY7-F25ucVXqxsD1Ty0000602c@hotmail.com...
> Hi,
>
> I am getting the following exception when testing the two attached files.
> Any ideas? I don't understand why the JSP is saying that the stream isn't
> multipart/form-data if I am using ENCTYPE="multipart/form-data" on the
HTML
> file. Am I missing something in the configuration?
>
> javax.servlet.ServletException: the request doesn't contain a
> multipart/form-data or multipart/mixed stream, content type header is null
> at
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:461)
> at
>
_0002ffileupload_0002ejspfileupload_jsp_3._jspService(_0002ffileupload_0002e
jspfileupload_jsp_3.java:88)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja
va:130)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:282)
> at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> at org.apache.tomcat.core.Handler.service(Handler.java:287)
> at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:80
6)
> at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
> at
>
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
> at java.lang.Thread.run(Thread.java:479)
>
> Root cause:
> org.apache.commons.fileupload.FileUploadException: the request doesn't
> contain a multipart/form-data or multipart/mixed stream, content type
header
> is null
> at
> org.apache.commons.fileupload.FileUpload.parseRequest(FileUpload.java:391)
> at
> org.apache.commons.fileupload.FileUpload.parseRequest(FileUpload.java:355)
> at
>
_0002ffileupload_0002ejspfileupload_jsp_3._jspService(_0002ffileupload_0002e
jspfileupload_jsp_3.java:77)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja
va:130)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:282)
> at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> at org.apache.tomcat.core.Handler.service(Handler.java:287)
> at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:80
6)
> at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
> at
>
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
> at java.lang.Thread.run(Thread.java:479)
>
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>


----------------------------------------------------------------------------
----


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org




Mime
View raw message