Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > problem read ServletInputStream

Thread Tools

problem read ServletInputStream

Posts: n/a

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.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing ServletInputStream adblock Java 7 01-31-2008 03:55 PM
Help: Program to read from EOR end of last read? Java 3 04-07-2006 12:32 PM
Binary data stored in SQL Server: can't read from ASP.NET, *can* read from Access? Doug ASP .Net 3 11-04-2005 07:35 PM
ServletInputStream - reads slowly in larger stream of data Suresh Java 0 09-21-2005 08:14 AM
Re: How to change Read Only Constraint to Read-Write Isaac VHDL 0 07-10-2003 01:43 PM