Hi
Im using the oreilly multipartrequest classes

I know it's a simple thing but Im definitily missing something here.
The very first FORM where the file is chosen, I include in the form
A file save path,
But when every I add my path to the multipart request like so:-

<FORM ACTION="/servlets/upTest" ENCTYPE="multipart/formdata" METHOD=POST>
<input type=text name=savepath>
<input type=file name=file>
<INPUT TYPE=SUBMIT>
</FORM>

doPost () ....


String path = req.getParameter("savepath")


String holding = "/docs/somemaindir/" + savepath;

          MultipartRequest multi =
                new MultipartRequest(req, holding,5 * 1024 * 1024);

things go boom after that with following error...

java.io.IOException: Corrupt form data: premature ending at
com.oreilly.servlet.MultipartRequest.readRequest(MultipartRequest.java:275)


Why can't I get and use the savepath and holding in one dopost ,
But if I remove the String path = req.getParameter("savepath") it works
fine,
Arghhh help!!!!...
Is there a way around this ? , All help greatly appreciated ,

I have bought the book BTW.:-)
Please could you cc to [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>  as it's a long weekend holidau in england
!, thanks for any help again


Kind Regards

Ejber Ozkan
Ezz                                     Colt
                                        [EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to