aspose file tools*
The moose likes JSP and the fly likes Problem with Image display in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem with Image display in JSP" Watch "Problem with Image display in JSP" New topic
Author

Problem with Image display in JSP

M K Rayapudi
Ranch Hand

Joined: Feb 19, 2007
Posts: 157
I am able to upload images, but unable to show/render it in a jsp.
Please help in this regard.
thank you


R6i
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41571
    
  54
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.


Ping & DNS - my free Android networking tools app
M K Rayapudi
Ranch Hand

Joined: Feb 19, 2007
Posts: 157
thank you Ulf Dittmer
M K Rayapudi
Ranch Hand

Joined: Feb 19, 2007
Posts: 157
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
Marshal

Joined: Mar 22, 2005
Posts: 41571
    
  54
What is the URL? If it works in the browser, then it should work in an HTML page.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Can't read it.
 
Consider Paul's rocket mass heater.
 
subject: Problem with Image display in JSP