I am trying to send a request to a java servlet from an ATL dll. While I
can get a connection to <server>:<port> with a socket, how do I tell the
server which servlet to send my request to?

Currently, I connect to the servlet like this:
// --------------
if (0 == (hInternet = InternetOpen(_T("RoutingClient"),
INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0))) {
// Handle error
}
if (0 == (hConnect = InternetConnect(hInternet,
"localhost", 8080, _T("Client"),
0, INTERNET_SERVICE_HTTP, 0, lContext))) {
// Handle error
}
if (0 == (hHttp = HttpOpenRequest(hConnect, _T("GET"),
"/servlet/MyServlet, HTTP_VERSION, 0, 0,
INTERNET_FLAG_KEEP_CONNECTION, lContext))) {
// Handle error
}

// strEncoded has my request
HttpSendRequest(hHttp, 0, 0, (void *)strEncoded.c_str(), strEncoded.length());

InternetReadFile(hHttp, (void *) buf, sizeof(buf), &bytesRead);
// ---------------
I get a connection to the servlet, but it reports (in the InternetReadFile
call) that my request is empty.

TIA for advice or pointers to more information.