You don't want to do that - you'd have to speak JServ's proprietary protocol to the engine. What you want to do is connect to Apache and speak HTTP to it. I'm sure you can find an HTTP client library for C++ on the web, if not it's very easy to implement by hand.

In terms of the HTTP upload, you can use a raw POST, or if you want it so it would be compatible with possible future use by a browser with and file upload widget, then use the multipart encoding standard. Java Servlets do not have decoding for this format (it's somewhat like multipart MIME email) but there is an excellent O'Reilly utility library which is yours for the price of a book.

Derreck da Cruz wrote:

 Hi, I am trying to connect a c++ client using sockets, directly to the JServ VM, to send a text file to a servlet.Is it possible to use raw TCP/IP sockets to connect directly to the VM?How can I do it and send the text file to the servlet? Derreck Da Cruz

--
David Crooke, Austin TX, USA.
Bibo ergo sum.
Open Standards. Open Source. Open Minds.
 

Reply via email to