File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP 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 ?
It is sorta covered in the JavaRanch Style Guide.
subject: How to get the request content...