I'm having a hard time deciding how to do this correctly so any input would be appreciated.
I'm trying to transfer my xml files from and applet to a servlet.
The solution I found for now is to pass the XML file as a string of data in a POST request.
When googling the problem I found the option of sending it by FTP.
What I would like to know is is there a way to simply transfer a XML file using HTTP
Jason
You are on the correct track. Do a HTTP POST of the XML to a Servlet. But if the number of XML's to be transferred is huge then FTP might be the right option.
HTTP protocol at its core isn't designed for file transfer. You have the basic GET and POST requests and that's pretty much it. Everything else is built up from those fundamentals. A common strategy is to encode file transfer as a higher-level protocol on top of HTTP POST. This requires a client and a server that understand this file transfer. I don't believe there has been any standardization of file transfer over HTTP.
I would not recommend using FTP as HTTP is more likely to tunnel properly through all the proxies that your users might have to contend with.
You can try multipart POST or else you could try PUT HTTP methods to transfer the file as binary. In the servlet, you can reconstruct the data from the inputstream.