Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

unable to see the image  RSS feed

 
Kranthi Kondapaka
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i am able to view the .jpg image in the jsf designer view but unable to see in the browser.
is the problem in my application are is the problem with browser
 
Gaurav Ram
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When you open your browser and calls a page, then do the view source of that page and see that what path is there generated for image. Just check whether there correct path is coming or not.

Thanks,
Gaurav
 
Kranthi Kondapaka
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i checked out with the page source also

my project structure is something like this

project
|
webroot
|
web-inf
|
images
|
video.jpg
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing you keep in WEB-INF will be served to a client, so a browser can't access those images. Move the images directory to the same level as the WEB-INF directory.
 
Kranthi Kondapaka
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
still i am unable to view the image.
 
Kranthi Kondapaka
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and also I am getting a warning something like this

13:29:39,910 WARN [Parameters] Parameters: Invalid chunk ignored.

what it means and what it refers.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In that case, follow Gaurav's advice to check which path the HTML code is actually referring to. Then make that the image is accessible under that path (in other words, that there is no permission problem that prevents the image from being served). You should also check the web server logs to see if the image request comes in OK, and is answered by an HTTP 200 response.
 
Kranthi Kondapaka
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks guys,
i got the solution.
As Dittmer said,i shifted the images folder to the WEB-INF level and i am able to view the images .
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!