This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


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: 42047
    
  64
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: 42047
    
  64
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.
 
GeeCON Prague 2014
 
subject: Problem with Image display in JSP