File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Authentication not happening in IE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Authentication not happening in IE" Watch "Authentication not happening in IE" New topic
Author

Authentication not happening in IE

Jody Seigle
Greenhorn

Joined: Sep 29, 2000
Posts: 24
I'm attempting to provide basic authentication using a simple servlet. The code should display a dialog prompting for username and password. If Cancel is pressed then an error page will be displayed. The following code accomplishes this in Netscape :
resp is a HttpServletResponse

However the dialog box does not display in Internet Explorer, the error page immediately displays. I've gotten around this by using the PrintStream in the HttpServletResponse and calling setStatus without the error page but I would like to know why this is occurring. This is only happening with a recent upgrade to the servlet API version 2.2.
I've found this problem posted on sun's java forums with no solution. Thanks for any help.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Which application server are you using? If it supports basic authentication (and it should!) you can get everything you want via configuration rather than having to code it.
Security via configuration is the prefered mechanism since it covers a range of resources rather than having to protect each page separately.
Dave
Jody Seigle
Greenhorn

Joined: Sep 29, 2000
Posts: 24
No app server. Just Netscape Enterprise web server 6.0 and HTML pages.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Authentication not happening in IE
 
Similar Threads
web.xml
Weird error uploading file via https
The method isEmpty() is undefined for the type String
error-page with tomcat 4.1
Studying HeadFirst book: cannot make authentification