Need help porting a CURL PUT uploader to java servlet (httpput possibly?)
posted 2 years ago
I have been googling for many hours trying to find some info on how to do this..
What I have is a php uploader example for posting videos to a (ooyala.com) server.
My app has a tomcat backend with various servlets for doing POSTS, PUTS, etc..
I need to port the php/curl sample code over to a servlet.
This is the working php code:
But I am confused hot to acomplish this with HttpPut in my servlet because I dont know how to attach the video data.
Heres my servlet code:
All I really need is help with how to port that php/curl code to a java servlet..
I'm pretty much a newb at this stuff so it is still a bit confusing..
I hope someone in here can help me, I will be truly grateful!!
So is this the same as submitting the upload form and calling a servlet? Or have PHP do some stuff then call a servlet?
The first one can be done by using tomcat connector AJP (forwarding the request to servlet container from apache web server). Under this approach your entire upload processing logic is done in the servlet.