• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IE call the servlet multiple times

 
Myria Ben
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I call servlet (by IE6.0) one times but IE call servlet for me 2 times.

I've set my servlet to these below already but still have this problem.

int cacheExpiringDuration = 5000; //so much long time 5000 secs
response.setDateHeader("Expires", System.currentTimeMillis() + cacheExpiringDuration * 1000);

and I call by this url:
http://localhost:8080/bizExtra/salesMgmt/posSalesReceiptFullPdfServlet.pdf?documentID=aa-stationID3-0&dummyID=.pdf

Anybody can help me pls. :roll:
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you log the exact URL the browser is fetching? Browsers often generate an extra request for a file "favicon.ico" to show next to the URL in the address bar.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I seem to remember hearing something about this problem before. Something about one call to get the size and the second to get the content.
Are you setting the content-length in the response?
Bill
 
Myria Ben
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
My servlet is already set by these.

response.setContentType("application/pdf");
response.setHeader("Content-Disposition", "inline;filename=\"" + System.currentTimeMillis() + ".pdf\"");
response.setContentLength(bytes.length);

How do I do about favicon.ico?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic