aspose file tools*
The moose likes Servlets and the fly likes Problem with image displaying in jsp page. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem with image displaying in jsp page." Watch "Problem with image displaying in jsp page." New topic
Author

Problem with image displaying in jsp page.

Thomas Byrne
Greenhorn

Joined: Aug 21, 2012
Posts: 16

Hi fellows,

I'm a bit lost with following scenario:

1. user upload image - upload.jsp
2. servlet do all dirty job
2a. save image to disk
2b. get name of the file
2c. save the name in session
2d. and redirect to display.jsp)
3. on the display.jsp, just uploaded image should be presented.

Unfortunately the display.jsp page is empty. When I look at source page under firefox, everything seems to be fine, valid link to the image is provided.

But under Media info I can see some weird infos:

Here is code used for uploading, processing and displaying picture:
1. upload.jsp

2. Upload.java
(The MultipartMap servlet belongs to BalusC, http://balusc.blogspot.com.au/2009/12/uploading-files-in-servlet-30.html)

3. display.jsp

If I replace, in display.jsp, ${filename} with static name of the particular image uploaded before, there is no problem with displaying so I suppose the images are processed correctly just something is missing on forward side?

By the way: when debugger is active everything is OK but when switch off the problem is back.

Cheers,
Thomas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with image displaying in jsp page.