• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with image displaying in jsp page.  RSS feed

Posts: 16
Mac OS X Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!