| Author |
How to display an image file to jsp
|
John McDonald
Ranch Hand
Joined: Jul 01, 2003
Posts: 112
|
|
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
Joined: Jan 10, 2002
Posts: 56547
|
|
|
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.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
If you'd like an example, I have one on my site. http://simple.souther.us Look for SimpleStream.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: How to display an image file to jsp
|
|
|