aspose file tools*
The moose likes Websphere and the fly likes images included in JSP pages don't always load Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "images included in JSP pages don Watch "images included in JSP pages don New topic
Author

images included in JSP pages don't always load

Darryl Gates
Greenhorn

Joined: Nov 26, 2001
Posts: 4
Hi,
I have some JSP pages where I am including images (the image name is retrieved from a database) using syntax such as:
<img src="<%= pictureFileName %>" >
This is done in a loop, running through an enumeration and retrieving various images for diaply in a table of images. The problem is that sometimes the images load and sometimes they don't. I know the images are available, since I can see them in the proper place in the directory and sometimes they are sent properly and appear. Why would they only load sometimes and not others. In a page with a bunch of pictures, I generally get about 3 or 4 that don't load, but never the same 3 or 4! Pressing refresh can even change which images are loaded properly!
I'm using Websphere 3.5.2. Is there something wrong with the File Serving Servlet and I need to change configurations?
Also, this was happening with my stylesheet that was linked in using:
%lt;link rel="stylesheet" href=...... >
Sometimes the page would appear using the stylesheet and sometimes not. I changed it so the stylesheet is included in place using a jsp:include and that fixed that problem.
It seems the server is just not sending all the content all of the time, but it is never consistent on what content it forgets to send!
Any help would be appreciated.
If you would like to see the application in action (it is a school project of an online auction website) email me and I'll send you the URL where it is deployed.
Darryl Gates
Greenhorn

Joined: Nov 26, 2001
Posts: 4
Also, if this makes any difference, I haven't experienced this problem using the Websphere Test Environment in Visual Age.
 
jQuery in Action, 2nd edition
 
subject: images included in JSP pages don't always load