Velocity Reviews

Velocity Reviews (
-   Java (
-   -   problem read ServletInputStream (

AlexF 12-05-2006 07:39 AM

problem read ServletInputStream

I didn't find the answer at group content.
May be anybody knows how to solve this problem?

I use HTTPS connection and servlet receives XML to parse.

With JDK1.4 was no problem with reading ServletInputStream:

ServletInputStream inputStream = request.getInputStream();"After Get Input Stream.");
ByteArrayOutputStream uploadBuffer = new

int count;
byte[] buff = new byte[2048];"Start reading from buffer");
while ((count = != -1) {
uploadBuffer.write(buff, 0, count);
}"End reading from buffer");
req = new String(uploadBuffer.toByteArray());

The same code compiled with JDK1.5 returns empty request - at first
read the return value is -1.
I've tried all read(..) methods but without unsucceed.

Please, help to solve the problem.

All times are GMT. The time now is 03:48 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.