how to send data to webserver using post?

now, I'm trying to send data to webserver from arduino UNO with Ethernetshield.
when i implement this source code, there is no error. and i can check "connected""post complete" at serial monitor.
but i can't identify receive post at web server.
web server is consist of eclipse, apache tomcat 6.0, oracle.
help me~~ :cold_sweat:
________________________ sketch ____________________________________________
#include <SPI.h> // needed for Arduino versions later than 0018
#include <Ethernet.h>

byte mac[] = { 0xCC, 0xAC, 0xBE, 0xEF, 0xFE, 0x91 };
IPAddress wserver(128,134,51,11);

IPAddress ip(192,168,0,21);
IPAddress gateway(192,168,0,1);
IPAddress subnet(255,255,255,0);

EthernetClient client;

void setup()
{
Serial.begin(9600);
while(!Serial) {
;
}

if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
Ethernet.begin(mac, ip, gateway, subnet);
}
delay(1000);
Serial.println("connecting...");

if (client.connect(wserver, 8888)) {
Serial.println("connected");
client.println("POST /SubwayPassenger/SubwayEnvironment HTTP/1.1");
client.println("HOST: 128.134.51.11:8888");
client.println("Content-Type:application/x-www-form-urlencoded");
client.print("Content-Length: ");
String str = "key=value";
client.println(str.length());
client.println();
client.println(str);

Serial.println("post complete");
}
else {
Serial.println("connection failed");
}
}

void loop()
{

}


------------------------------------------------------server post function --------------------------------------
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

response.setContentType("text/html");
response.setCharacterEncoding("euc-kr");
PrintWriter out = response.getWriter();

System.out.println("dopost request");
...

Maybe it would help to check the webserver's log files.

Your POST send is not completed. You must read the server response and close the connection.

 if (client.connect(wserver, 8888))  {
    Serial.println(F("connected"));
    client.println(F("POST /SubwayPassenger/SubwayEnvironment HTTP/1.1"));
    client.println(F("Host: 128.134.51.11"));
    client.println(F("Content-Type: application/x-www-form-urlencoded"));
    client.print(F("Content-Length: "));
    char str[] = "key=value";
    client.println(strlen(str));
    client.println(F("Connection: close\r\n"));
    client.println(str);

    while(client.connected()) {
        while(client.available()) {
            Serial.write(client.read());
        }
    }
    client.stop();
    Serial.println(F("post complete"));
  }

edit: I removed the String data type and replaced it with a character array. Every time I use the String type, my code crashes.
I also added the F() function to your static strings. That will save you some SRAM.

thaks your guys. even thoughI can't check server log, I solve this problem. the solution of SurferTim is right.
I'm going to study hard from the basics. ^^;