Forum Stats

  • 3,826,851 Users
  • 2,260,713 Discussions


Byte data sent to servlet after encoding it to String doesnt display the image?

vo12 Member Posts: 38

I have image in byte data. I want to display image using servlet.

To pass data to servlet as parameter i need to convert byte array to string as i cant pass byte array as arguements.

I am using Base64 to encode and decode to String and byte[] respectively.

However when i use this approach image doesnt get display.

But when i directly call service in servlet to get string and decode to byte[] image gets displayed.

So is data getting lost when i call servlet from .jsff page with encoded string ?

Please help.

This discussion has been closed.