• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

retrieve photo

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai all

in my Emp table

id,name,photoName,remarks

i stored photo in to the server/deploy/test.war/images/Lura.jpg ,inthe table i stored only the nname of the photo

i needed, how i retrieve photoname and display photo on jsp page?

please help me...........
 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please read the naming policy of the site!

Remember paths of stuff in your WAR file is relative.

So if you images are stored in /images in your WAR file, you could use the following to display an image on a .jsp:

<%
// put your code to retrieve the filename from the db here
// lets assume you put it in a String called "filename":
filename = "myimage.jpg";
%>
<img src="/<%=request.getContextPath%>/images/<%=filename%>">
[ September 27, 2005: Message edited by: Scheepers de Bruin ]
 
This tiny ad is wafer thin:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic