• 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

External Image is not loading into JSP using Spring McS

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

I am using Spring and Hibernate project and I can able to get the inside problem images however not the out side images.

I have tried the all the ways and even adding into ResourceHandlers




Using ''uploadfiles" as reference to get the pics




Anyone can help me how to display the those pics. Thanks in Advance.

images.PNG
[Thumbnail for images.PNG]
Image not getting displayed
 
Sheriff
Posts: 67746
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
Page-relative URLs are almost guaranteed to cause problems. Use server-relative URLs that start with the context path. See the JspFaq for more information.
 
Arun chandu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for suggestion, Actually though images are uploaded form to FTP from the local system. How can we access those image and display to browser.

Its really argent help me out!
 
Bear Bibeault
Sheriff
Posts: 67746
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

Arun chandu wrote:Thanks for suggestion, Actually though images are uploaded form to FTP from the local system. How can we access those image and display to browser.


Maybe, I'm not understanding the issue? (your sentence isn't very clear)

Where are the images? On the server system? Somewhere else? How they got there (like FTP) isn't very relevant.
 
Arun chandu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I apologize for the mistake.

I am using VM Linux system as server and Tomcat-8 as Application server. Files are uploading into Linux system using FTP on particular folder (eg: /design-doc/2016/March/25/) and Application is deployed into "/opt" folder.

root
|
|--------------Design-doc
|--------------opt
|--------------Logs

I Want to display the uploaded images in Jsp. I hope, you understood Sir!

unfortunately, Images are not displaying. How to solve the problem.

Thanks
Arun
 
Bear Bibeault
Sheriff
Posts: 67746
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
Regardless of how the images got where they are, they need to be able to be served via a URL. If the image cannot be accessed via a URL, it cannot be displayed on a page.

So, either the image must be part of a web app, or you must write a servlet that reads the image data from the file, sets the appropriate headers, and sends the image data. For the latter case, the URL of the servlet is what would be used to access the image from the pages.
 
Popeye has his spinach. I have this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic