Hey. I am having problems with the com.oreilly.servlet
MultipartRequest.   I am trying to setup this form which may or may not
upload file(s).  The way it is setup now it get's the uploaded file.  Puts
it into the temp directory, but it throws this error.  


java.io.IOException: Corrupt form data: premature ending
        at
com.oreilly.servlet.MultipartRequest.readRequest(MultipartRequest.java:356)
        at
com.oreilly.servlet.MultipartRequest.<init>(MultipartRequest.java:149)
        at
com.oreilly.servlet.MultipartRequest.<init>(MultipartRequest.java:105)
        at iguana.util.FormUtil.getParamValues(FormUtil.java:26)
        at
jrun__page_templates__html__ArticleDispatcher2ejsp2a._jspService(jrun__page_
templates__html__ArticleDispatcher2ejsp2a.java:45)
        at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java:40)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
        at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
        at
allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:34
)
        at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:174)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
        at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
        at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
        at iguana.burlap.MarkupManager.forward(MarkupManager.java:33)
        at
iguana.burlap.servlet.BaseBurlapServlet.handleRequest(BaseBurlapServlet.java
:95)
        at
iguana.burlap.servlet.BaseBurlapServlet.doPost(BaseBurlapServlet.java:75)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
        at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
        at
allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:34
)
        at allaire.jrun.servlet.Invoker.service(Invoker.java:84)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
        at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
        at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
        at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
        at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
        at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
        at allaire.jrun.WorkerThread.run(WorkerThread.java:74)


Here is Line 26:
MultipartRequest multi = new MultipartRequest(request, "./tmp/"); 

        And further more.   When I try to get an enumeration of File
uploaded like this:

                                        Enumeration files =
multi.getFileNames();
                                        while (files.hasMoreElements()){
                                                System.out.println("File: "
+(String)param.nextElement());  
                                        }

        It returns nothing.  Even if the file appears in the ./tmp/
directory.


        Any ideas on how to solve this problem?


------------------------------------------------------------
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:       [EMAIL PROTECTED]

Reply via email to