Hi,
I'm trying to read the POST data from a HttpServletRequest in tomcat 5.x. request.getContentLength() returns 15, but request.getInputStream is always empty!
ServletInputStream cont = request.getInputStream();
sb.append("\nContent available:");
sb.append(cont.available());
sb.append("\nContent:");
BufferedReader br = new BufferedReader(new InputStreamReader(cont));
sb.append(br.readLine());
i have tested this with requests from an html form and requests programatically generated.
what am i doing wrong?
Is this because the servlet has already read the post data and used it's content to populate request.getParameters?