This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See Plaese help me.
Regards and Thanks
From Parshuram Walunjkar
Author and all-around good cowpoke
Posts: 13078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The most important things to remember are:
1. Each image displayed by a browser comes from a separate request.
2. You have to use your JSP to build a page in which the <IMG tag has a SRC url that points to something which can serve that image data as binary data.
3. JSP is designed to serve character data, not binary data.
4. When serving image data you must set the content type correctly - and it is a good idea to set the content length correctly too.
5. Therefore your image data should come from a servlet. Don't panic, it isn't that hard.
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the advantage to having the images stored as a BLOB? I have always assigned images to a user by storing the path instead.
Just curious as to what the benefit is...
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!