aspose file tools*
The moose likes JSP and the fly likes Problem with MultipartFormDataRequest Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem with MultipartFormDataRequest" Watch "Problem with MultipartFormDataRequest" New topic
Author

Problem with MultipartFormDataRequest

Ajay Anand
Greenhorn

Joined: Mar 17, 2010
Posts: 2
I am using MultipartFormDataRequest to upload files to my server. My problem is one day it works and another day it doesnt. Despite the code being same, MultipartFormDataRequest works inconsistently. There are no script or jsp errors. Can anyone help me?? I have pasted the code below. Please help its urgent . Thanks. Both the code snippets are from the same jsp file
Here the multipart code snippet


and here is the form for uploading the files

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61606
    
  67

What upload package are you using and why is there code in a JSP? Move the code to a servlet.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ajay Anand
Greenhorn

Joined: Mar 17, 2010
Posts: 2
I am using oreilly's servlet package(cos.jar)
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I can't make heads or tails of that. Is there anything in the logs?

Why do you sleep for two seconds for no apparent reason in the middle?
Nishikant Nipane
Greenhorn

Joined: Mar 17, 2010
Posts: 3
David Newton wrote:I can't make heads or tails of that. Is there anything in the logs?

Why do you sleep for two seconds for no apparent reason in the middle?


Why are not you try to make unique directory for every file name ? Will help in removing confusion as well. Please code as much in servlet as compared to jsp. What exactly happens when you submit the page?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with MultipartFormDataRequest