This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes how to insert image in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to insert image in jsp" Watch "how to insert image in jsp" New topic
Author

how to insert image in jsp

s vijay
Greenhorn

Joined: Aug 27, 2001
Posts: 4
can any one give me some sample code on how to insert a image in to jsp page.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
Remember two things:
1. JSP builds a HTML page - to add images, etc you have to have your JSP create normal HTML markup. If you are having problems, make a static HTML page that does what you want first.
2. JSP output is naturally character oriented because out is automatically created as a JSPWriter. You can't write binary data such as an image or PDF file with a Writer.
Bill
------------------
author of:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to insert image in jsp