Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to upload a file to servlet

 
Shan Accent
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai,

I don't know how to upload a file to servlet. did the servlet package has build in methods. please tell me? I am waiting for reply.
 
Neeraj Dheer
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no. the java servlet packages do not have in-built functionality for uploading files to the server.

you will have to use a third party package like The O'Reilly Multipart Package for uploading files to the server.
 
Shan Accent
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai ,
can you give me a some sample code to do the uploading a file by using the
O'Reilly Multipart Package.
 
Neeraj Dheer
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
download the jar file. i think there is an example upload.war included in it.

plus if you do some googling, there are lots of tutorial/sample codes out there
[ May 09, 2005: Message edited by: Neeraj Dheer ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic