This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes Doubt in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Doubt in JSP" Watch "Doubt in JSP" New topic

Doubt in JSP

Kumaran Sowrirajan
Ranch Hand

Joined: Oct 15, 2001
Posts: 36
I need to show the Image as well as some data related to that Image in JSP.Image and their related data's are stored in database.
Because both the content type are different also i dont know how to show the different content type in single request?
Can you please tell me how can i show both the data [Image and Text] together.
Sujatha Kumaran.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60800

Remember that a JSP is just a template to create an HTML page to send to the client. So how would you solve this in an HTML page?
The text would simply go on the page, and the image would be referenced via an <img> tag. The URL of the image tag could be a "hard" URL of the image file on disk, or the URL to a servlet that returns the image data (with corresponding content type).

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Don't get me started about those stupid light bulbs.
subject: Doubt in JSP
Similar Threads
Need urgent help
How should we share regions in JSF.
Need help related to content type issue
Not able to display image from the object retrieved back from the database into the jsp page.
Optimistic Or Pessimistic locking .