• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to display an image file to jsp

 
John McDonald
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
In the server code, if I have an image file on the memory, how do I write it in to a jsp file to display? I don't want to disposite to a physical location and then use image tag <img src=".../picture.jpg">. Thanks.

John Giang
[ December 19, 2005: Message edited by: Ben Souther ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The src of the image tag can reference a servlet that can serve up the image data. Be sure to set the response headers correctly.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you'd like an example, I have one on my site.
http://simple.souther.us
Look for SimpleStream.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic