This discussion is archived
0 Replies Latest reply: Aug 11, 2013 11:57 PM by vo12 RSS

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

vo12 Newbie
Currently Being Moderated

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.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points