File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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: 39548
    
  27
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 - updated with new look and Ping home screen widget
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: 39548
    
  27
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with Image display in JSP
 
Similar Threads
problem in uploading the file in springframework
Getting "not a multipart request" even though the image is being saved.
image is not uploaded into the database
Array Index Out Of Bounds
how to upload using html or javascript?