This week's book giveaway is in the JavaScript forum.
We're giving away four copies of JavaScript Promises Essentials and have Rami Sarieddine on-line!
See this thread for details.
The moose likes Servlets and the fly likes How to get the request content... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to get the request content..." Watch "How to get the request content..." New topic

How to get the request content...

Hongqing Lu

Joined: Jan 14, 2004
Posts: 13
There is a HTTP Post like this from a client:
POST http://local:8080/test HTTP/1.1
Content-Type: text/xml
Content-Length: 210
<?xml version="1.0" encoding="UTF-8"?>
<DateTime>11/10/2003 06:33:33</DateTime>
I need to get the content of the xml through servlet.
What can I do?
Please help
Arnold Reuser
Ranch Hand

Joined: Nov 20, 2003
Posts: 196
Why don't you use :
ServletInputStream sip = myRequest.getInputStream();
in the doPost()-method ?
I agree. Here's the link:
subject: How to get the request content...