• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to upload a file using swing to web server

 
Vijay Kumar
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ..
can any body give me an idea how to upload a file using Swing.
I have created a diagloge box using file chooser and can choose a file.
but should be the next step to send it to the web sever ie tomcat

thanks
 
VIJAY Yadlapati
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am assuming that you are having a servlet deployed on Tomcat that reads the file data.

From Swing application, you have to open a URL Connection to that servlet and write the HTTP Post Request to that stream.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!