OK, I see the call to getParameter family was important.
I changed the code as follows and received the POST data. However the output is not too pretty. Any ideas how to fix this up? Thanks
Main Topics
Browse All TopicsFolks,
I am trying to read the POST data sent via HTTP POST request using a .jsp HTTPServletRequest. Problem is the request.getReader() does not return the data stream. This was noted on various search result threads under, 'httpservletrequest getreader returns nothing', and seems to be the same issue I'm having, but I can't figure out how to get around the issue.
This is the same issue as had addressed using PHP, http://www.experts-exchang
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Try this:
<%
if (request.getContentLength(
String line;
try {
java.util.HashMap hashMap = (java.util.HashMap)request
Iterator iterator = hashMap.keySet().iterator(
while( iterator.hasNext() ){
String key = (String)iterator.next();
System.out.println(key + "=" + request.getParameter(key))
}
} catch (Exception e) { e.printStackTrace(); }
}
%>
Business Accounts
Answer for Membership
by: ioantonPosted on 2009-08-07 at 10:20:55ID: 25044992
Here is an excerpt from java servlet Specification, which might answer your question:
encoded
The following are the conditions that must be met before post form data will
be populated to the parameter set:
1. The request is an HTTP or HTTPS request.
2. The HTTP method is POST
3. The content type is application/x-www-form-url
4. The servlet has made an initial call of any of the getParameter family of methods on the request object.
If the conditions are not met and the post form data is not included in the parameter set, the post data must still be available to the servlet via the request objects input stream. If the conditions are met, post form data will no longer be available for reading directly from the request objects input stream.