Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get the request content...

 
Hongqing Lu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"?>
<CancelOrders>
<Cancel>
<ItemID>898980</ItemID>
<UserName>REM</UserName>
<DateTime>11/10/2003 06:33:33</DateTime>
</Cancel>
</CancelOrders>
I need to get the content of the xml through servlet.
What can I do?
Please help
 
Arnold Reuser
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don't you use :
ServletInputStream sip = myRequest.getInputStream();
..
in the doPost()-method ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic