I am using servlet to receive request in Struts2 for cXML punchout module, the XML document will be sent with request in stream and I had used request.getInputStream()
and request.getReader()
to receive but when the request hits my servlet from remote client system inputSteram.read()
returns -1 , but req.getContentLength()
returns length of the XML string from request object.
How can I get over from this issue? Is there any other way to carry out this process?
note: the same servlet works in non-struts environment.......!