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

Image from Database

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in a portal, the empployee's pic is stored under the /build/web/userpic directory

the name of the pic is stored in a MySQL database,
I use a result set to get the name of the pic, and i want to display the employee's image.
like ths

<img src="../../build/web/userpic/<%=rs.getString("picture")%>">
(two directories up)

but the image is not getting displayed

Please help!
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it in /build/web/..., or is it in ../../build/web...?
 
Hari adya
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I solved the problem
regarding your question. the JSP page is present in
/web/user/

pic in
/build/web/userpic/

i thought i have to go 2 levels up and then come back to userpic, but now i came to know USERPIC folder in build is a referred runtime i have to give http://localhost:8084/XXXXXXX/userpic/img.jpg but not http://localhost:8084/XXXXXXX/build/web/userpic/img.jpg

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic