This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Generating files with servlets
 
Similar Threads
Programatically call Java 2 secured page
empty auth-constraint
Using both BASIC and FORM authentication for different sections of same web application
How to force the client to use SSL to access JSP pages
DIGEST auth-method