• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

images not loading

Posts: 26
  • Mark post as helpful
  • send pies
  • 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
Posts: 26
  • Mark post as helpful
  • send pies
  • 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...
Tongue wrestling. It's not what you think. And here, take this tiny ad. You'll need it.
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic