Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

get ting absolute path

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

We have web J2EE web based application which is deployed on weblogic
8.1 as an ear.
This EAR contains some EJB's some jar files and a war file.
Hi All,
We have web J2EE web based application which is deployed on weblogic
8.1 as an ear.
This EAR contains some EJB's some jar files and a war file.

Now we want to display an image on the jsp after retreiving it from the
database.Image is stored in the database as a BLOB object.
Currently what is implemented is e.g as soon as user selects a product an
image file (.jpg) is generated from the BLOB
object (at some predefined location say C:\ImageFolder) and in jsp(HTML)
we display this image with with giving this path in
IMG src tag.

Is there any way where we can get rid of this absolute path(hard coded)
path and generate the image at a relative path and display
from there in our jsp or is there any other wat to achieve it.
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are users supposed to access an image on your C: drive?
 
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why are you putting the jpeg into a file, you should be generating the output on the fly. I don't know much about JSP's but in a servlet you would use the response.getOutputStream and response.setContentType to send an image directly to the client. I suspect that JSP has tags for this sort of thing.
 
peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Marc Peabody:
Train yourself to let go of everything you fear to lose. - Yoda



Attachment is the cause of all suffering. - Buddha
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator



Originally posted by Marc Peabody:
Train yourself to let go of everything you fear to lose. - Yoda


Originally posted by peter wooster:


Attachment is the cause of all suffering. - Buddha



you missed the point peter, but still funny.
reply
    Bookmark Topic Watch Topic
  • New Topic