• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem when using Servlet filter in front of a web service

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for reading my post
Can some one pelase let me know what is wrong with this filter?



the above code return an exception like following one in the server:






in the client side which is a web service client (filter works on any
request come to my web applicaton)
 
Herman Schelti
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

can you put


before the 'read'?

Herman
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


That is a very common error - available() is NOT the same as the total length of the request body - try the content length header or read into an expandable buffer - like ByteArrayOutputStream.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic