Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

start stop image  RSS feed

 
zita lakshmi
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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/>      
<cut value="${image}">
</cut>
</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
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

 
Henry Mbadiwe
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Zita, have you seen my post..? Have you tried to implement it?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!