This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes file upload using flex and jsp getting extra things... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "file upload using flex and jsp getting extra things..." Watch "file upload using flex and jsp getting extra things..." New topic
Author

file upload using flex and jsp getting extra things...

Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
Hi,

I am working on a application where I am using adobe flex. I have a requirement wher I have to upload file to the server. System allows user to browse file from local machine and flex uploads it to the server.

Now there is a upload url, its a jsp page which gets mutipart/form-data content from the request, opens an outputstream and writes the content of the inputstrem to the file.





Above jsp writes the content of browsed file to d:/naseem.txt

Problem which I am facing is besides the actual content, it also write something else.


Actual file:


My Text


upload txt file which I got:


------------cH2ei4GI3ae0KM7cH2GI3ei4ae0cH2
Content-Disposition: form-data; name="Filename"

test.txt
------------cH2ei4GI3ae0KM7cH2GI3ei4ae0cH2
Content-Disposition: form-data; name="author=Author"; filename="test.txt"
Content-Type: application/octet-stream

My Text
------------cH2ei4GI3ae0KM7cH2GI3ei4ae0cH2
Content-Disposition: form-data; name="Upload"

Submit Query
------------cH2ei4GI3ae0KM7cH2GI3ei4ae0cH2--



My question is how do I remove these content-disposition, content type i.e., extra things from my file. I need only content to be written in the file.

Regards,
Naseem


Asking Smart Questions FAQ - How To Put Your Code In Code Tags
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: file upload using flex and jsp getting extra things...
 
Similar Threads
File downloads...
downloading with applet from servlet
when streaming doc ciontent to browser, multiple IE File Download prompts displayed
Servlet downloads Excel file ok but also attempts Servlet & JSP files !!
Download file from Servlet via Applet