• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with Image display in JSP

 
M K Rayapudi
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am able to upload images, but unable to show/render it in a jsp.
Please help in this regard.
thank you
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code is likely is creating an incorrect URL for the image to be accessed. Copy the image URL from the HTML and paste it in the browser - is that where the image lives?

As an aside, you should never do this kind of stuff in a JSP - that's what servlets and backing beans are for. Read up on the MVC pattern to learn why.
 
M K Rayapudi
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you Ulf Dittmer
 
M K Rayapudi
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:The code is likely is creating an incorrect URL for the image to be accessed. Copy the image URL from the HTML and paste it in the browser - is that where the image lives?


Yes,
the url in the browser showing the image properly,
but not showing in the jsp page properly.

thank you
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the URL? If it works in the browser, then it should work in an HTML page.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can't read it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic