• 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
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

images not loading

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I load images into an applet and for all intents and purposes it appears the image has loaded, minus actually seeing an image. The size of the image is there, it says it is reading them from the java console:
Socket connection
Loaded image: http://localhost:8080/vcei_s/online/images\-1\0-1.jpg
Loaded image: http://localhost:8080/vcei_s/online/images\-1\3-CT.3007.1.jpg
Loaded image: http://localhost:8080/vcei_s/online/images\-1\5-area_photo.jpg
Loaded image: http://localhost:8080/vcei_s/online/images\-1\9-Photo_012607_003.jpg
Loaded image: http://localhost:8080/vcei_s/online/images\-1\10-temp054.jpg
Loaded image: http://localhost:8080/vcei_s/online/images\-1\11-5.jpg
Loaded image: http://localhost:8080/vcei_s/online/images\-1\16-Creek.jpg

yet still no pictures...any ideas? Could this be related to my prevous file permissions problem even though I am not receiving an error on this one? Why are the slash and backslash different in the image path? However if I copy that and paste it into my browser the image loads...
 
philip depalo
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I discovered the issue with displaying the images



So I commented out the line that used File.separator to create the \ in between the directories and physically entered a "/" to denote the directories. This was all that was necessary. It seems that when the URL encodes the actual address it changes the File.separator \ to %5C which is the url code, but not when its supposed to show a directory. This also happened in one other place:



So that was the answer...
 
Message for you sir! I think it is a tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic