1) User uploads an image. 2) Application saves this image is a local directory on the server. ex: C:/Users/684/Profile/images/_DSC0034.jpg 3) Application stores the newly created image path in the database. 4) Application displays the image on a web page using the path from the db: ex: C:/Users/684/Profile/images/_DSC0034.jpg
However, in the last step where the application trys to display the image, the image FAILS to display. This used to on a Websphere server. I've moved to a Tomcat server and this does not work anywmore.
Why can't Tomcat display the actual image paths. How can I get this to work again?
In an effort to help everyone get the most from our forums, we've compiled a list of tips for asking questions here. You can find the list in our FAQ section here. In particular please see: UseRealWords
Abbreviations such as "u" or "ur" in place of "you" and "you are" or "you're" confound language translation software making it hard for our non-English speaking members to read your posts. "plz" is not a word in the English language.
Again, welcome to JavaRanch and good luck with your question. -Ben
That cannot work. The server will not serve anything under WEB-INF -- that's a protected region. Move all client-referenced resources (images, style sheets and script files) out of WEB-INF.
We still don't know what you structure is. The chart you posted isn't useful without indentation. Please go back and fix it by enclosing the folder chart in UBB code tags and adding the proper indentation.
The only reason it wouldn't work in Tomcat is if the URL is incorrect.
Take the time to post the directory structure correctly.
I added UBB Code tags to your first directory listing which made the indents show up. From that listing, it appears that the Users directory is under (inside) WEB-INF which, as Bear said, won't work.
I found that Right-Clicking on the light red 'x' on the non-displayed image and selecting on the 'properties' actually showed the path the server was trying to display. So, that helped me debug to get it to the right location.
This is a bad bad idea. Your URL is page-relative and is fragile and will break not only if any structure gets moved around, but even if you address the page in a different way (as the result of a forward or include, for example).
I strongly urge you to pay attention to the posts that have been made and adopt best-practice server-relative URLs.
Originally posted by Bear Bibeault: I strongly urge you to pay attention to the posts that have been made and adopt best-practice server-relative URLs.