• Post Reply Bookmark Topic Watch Topic
  • New Topic

GET and POST Method

 
Grishma Dube
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we send images thru GET or POST methd?

If yes, how?

TIA

Grishma
 
ramu av
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Grishma,

if mean uploading the images from client to server - yes you can send then using post method.
you need to use enctype='multipart/form-data' for the form

here is the sample code at the client



on the server within the doPost() method



for this u need to download cos.jar from Servlet.Com

place the cos.jar in common.lib of the server and import it in the file,


hope this helps.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just a suggestion.

use jakarta commons fileupload project, instead of doing it all on your own.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!