Meaningless Drivel is fun!
The moose likes JSP and the fly likes sending a file to servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "sending a file to servlet" Watch "sending a file to servlet" New topic

sending a file to servlet

sitaram irrinki
Ranch Hand

Joined: Feb 16, 2005
Posts: 158
I have a file of very very large file size at client side, and I have a JSP page. Using this JSP page, if I want to send the file to a servlet (this servlet will store it somewhere), what is the best method to do it
Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
Are you talking about a file upload?
SCJP 1.4
Manzar Zaidi
Ranch Hand

Joined: Oct 21, 2004
Posts: 43
I am using commons FileUpload to do this.

SCJP 1.2, SCWCD 1.4.<br />What goes around comes around ... with ver 1.1
Tom E. Cole

Joined: Oct 21, 2003
Posts: 9
And I use O'Reilly's package at
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
jakarta commons is your best bet. For more you can search this or servlet forum by the keyword "file upload". Lot of threads are discussing the same thing.
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1432
I used jakarta commons File Upload. But it gives FileUploadException. Any body knows the reason for this exception ?
Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
Could you post a stack trace?
I agree. Here's the link:
subject: sending a file to servlet
It's not a secret anymore!