Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Thumbnails not being displayed

Status
Not open for further replies.

kokoko12000

Programmer
Apr 14, 2003
13
0
0
US
Hi all,
I am displaying a list of thumbnails which are stored in the database.

I have a JSP file, say a.jsp. I have a while loop in a.jsp file which iterates over the list of thumbnails in the database. In a.jsp, I call for each thumbnail, thumbnail.jsp file for displaying it.

My problem is: Not all thumbnails are being displayed. If I refresh the JSP page, a few of them which displayed the last time are not being displayed and those which did not displayed last time are being displayed. I thought the problem is with buffersize. But tht did not solve my problem.

Could someone throw some light on it.

>>>>>>>>>>> a.jsp <<<<<<<<<<<<<<<<<<,
while(iterate over thumbnails stored in database) {
call thumbnail.jsp to display this thumbnail
}

>>>>>>>>>>>>>>Thumbnail.jsp source:<<<<<<<<<<<<<<<<<
InputStream in = resultset.getBinaryStream() response.reset();
response.setBufferSize(100000);
response.setContentType(&quot;image/jpeg&quot;);
PrintWriter writer = response.getWriter();
int data=0;
while( (data = in.read()) != -1) {
writer.write(data);
}
writer.flush();
writer.close();
response.flushBuffer();
 
well the error seems to be ur iteration process...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top