File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to get the request content..." Watch "How to get the request content..." New topic
Author

How to get the request content...

Hongqing Lu
Greenhorn

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"?>
<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

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: http://aspose.com/file-tools
 
subject: How to get the request content...