aspose file tools*
The moose likes Servlets and the fly likes Generating files with servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Generating files with servlets" Watch "Generating files with servlets" New topic
Author

Generating files with servlets

Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
I have an xml file that I want users to be able to download. I'm dynamically generating it with a servlet whenever the user connects. I'm using FORM auth. It works fine in Firefox, but it won't work in IE unless I remove the auth.

Any ideas?

Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
I just tried it with BASIC auth instead, and it didn't work either.

IE keeps saying that it was not able to open the site. The site is either unavailable or cannot be found.

It still works fine with FF, though.

I did the same setup before using BASIC auth and it worked, so I'm not sure why it's not this time.

Any ideas on what to look at?
Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
Okay, as far as I can tell, the main cause of this is from setting no-cache headers on the page.

However, I removed my no-cache settings and I'm still getting the error.
Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
Okay, somehow the cache-control header was still being set even though I didn't have it in my code. I set the header to public and IE works now.
 
Consider Paul's rocket mass heater.
 
subject: Generating files with servlets