HTTP/1.1 500 Internal Server Error



Hello! So finally I got my servlet working and interacting with my
applet via the org.apache.commons.HttpClient package. I got the POST
to work and give a response, and then I tried to add the element of
the RequestEntity, which I don't QUITE thoroughly understand, but
based on every example I've found, I think I've got right, except my
servlet returns a:

HTTP/1.1 500 Internal Server Error

I have tried each of the RequestEntities (StringRequestEntity,
ByteArrayRequestEntity, and InputStreamRequestEntity). I know that my
PostMethod object works, because I had it tested, and then the
relevant part of the applet code this this:

---

try {
ByteArrayRequestEntity request = new
ByteArrayRequestEntity(audioBytes);
serverPost.setContentChunked(true);

try {
httpClient.executeMethod(serverPost);
if (serverPost.getStatusCode() == HttpStatus.SC_OK) {


testText.setText(serverPost.getResponseBodyAsString());
System.out.println("success: " +
serverPost.getResponseBodyAsString());

} else {

//testText.setText("Unexpected failure: " +
serverPost.getStatusLine().toString());
System.out.println("Unexpected failure: " +
serverPost.getStatusLine().toString());
}

} finally {
serverPost.releaseConnection();
}

} catch (HttpException ex) {
System.out.println(ex.toString());
} catch (IOException ex) {
System.out.println(ex.toString());
}

---

Every time, I just get that error:
HTTP/1.1 500 Internal Server Error

I'm unable to find any other debugging information... any help is
thoroughly appreciated, thank you!

Joshua

.