Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to transfer a file from client to server???

 
Monarch Bhojani
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to send a file from my client application which is in Swing,, what i am doing that i just select the file by using JFileChooser, and after doing this i am getting the selected file path..

Now if i am sending this path to servlet. Now, can anyone tell me how I can get that particular file by using that file path which the client has send to the servlet....? And my further stuff is to pass that file from servlet to another client which is also running in Swing...

Please provide me related help regarding this...

Thank You.
Monarch Bhojani
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at the commons/httpclient from the apache-jakarta group:
http://jakarta.apache.org/commons/httpclient/features.html
It's cover page states that it supports form based file uploads.

For the server side, look at
http://jakarta.apache.org/commons/fileupload
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic