Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

start stop image

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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/>      
<c:out value="${image}">
</c:out>
</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.
 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Zita, have you seen my post..? Have you tried to implement it?
 
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
yeah, but ... what would PIE do? Especially concerning this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic