| Author |
start stop image
|
zita lakshmi
Ranch Hand
Joined: Nov 13, 2009
Posts: 37
|
|
hi sir,
i want to set the image according to the status which is getting from the database.
I've written the jsp coding as
<td></td>
<td class="style7" style="width: 108px"><strong>Campaign Image</strong>
<c:forEach var="campaignimage" items="${image}"><br/>
<c ut value="${image}">
</c ut>
</c:forEach>
</td>
while executing this page it is showing like this
[com.mysql.jdbc.Blob@bf1d3b, com.mysql.jdbc.Blob@118278a, com.mysql.jdbc.Blob@cc0e01]
[com.mysql.jdbc.Blob@bf1d3b, com.mysql.jdbc.Blob@118278a, com.mysql.jdbc.Blob@cc0e01]
[com.mysql.jdbc.Blob@bf1d3b, com.mysql.jdbc.Blob@118278a, com.mysql.jdbc.Blob@cc0e01] .
sir can you please solve this problem and send the required coding it's very urgent.
|
 |
Lorand Komaromi
Ranch Hand
Joined: Oct 08, 2009
Posts: 276
|
|
Sir, how is this related to Spring?
You should have a servlet that retrieves the image from the DB based on an id passed in as GET parameter, for instance, and writes the data of the image (Blob.getBytes()) to the client. And in the JSP you just reference this servlet:
|
OCJP 6 (93%)
|
 |
Henry Mbadiwe
Greenhorn
Joined: Feb 09, 2010
Posts: 4
|
|
First, could you disable smilies in your post?
Second, do you have anything else underlying this web page you're trying to display (applicationContext.xml for example, *-servlet.xml, *-service.xml, Controller classes)?
Maybe if you post those things we'll be able to help.
|
 |
zita lakshmi
Ranch Hand
Joined: Nov 13, 2009
Posts: 37
|
|
Hi
Thanks for your reply. I have used the following code in controller,
Here is the jsp code:
I got the result as,
Campaign Image
[com.mysql.jdbc.Blob@afae4a, com.mysql.jdbc.Blob@1db9852, com.mysql.jdbc.Blob@1ed5459]
[com.mysql.jdbc.Blob@afae4a, com.mysql.jdbc.Blob@1db9852, com.mysql.jdbc.Blob@1ed5459]
[com.mysql.jdbc.Blob@afae4a, com.mysql.jdbc.Blob@1db9852, com.mysql.jdbc.Blob@1ed5459]
please help to retrieve this problem,its very urgent.
|
 |
Lorand Komaromi
Ranch Hand
Joined: Oct 08, 2009
Posts: 276
|
|
Zita, have you seen my post..? Have you tried to implement it?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56183
|
|
JSPs create HTML. Do you show in image in HTML by including its bits in the page? Of course not. Think!
You use an <img> tag as Lorand has shown.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: start stop image
|
|
|