aspose file tools*
The moose likes Servlets and the fly likes IE call the servlet multiple times Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "IE call the servlet multiple times" Watch "IE call the servlet multiple times" New topic
Author

IE call the servlet multiple times

Myria Ben
Greenhorn

Joined: Jan 04, 2005
Posts: 4
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:


None
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
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.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12674
    
    5
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

Joined: Jan 04, 2005
Posts: 4
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IE call the servlet multiple times
 
Similar Threads
tomcat- set JAVA_HOME point to jdk..
tomcat4
Basic doubt
Servlet problem
call link to generate jasperreports by IE doesn't work.