• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Why do I have to type in twice to log in with basic authentication?

 
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When my web app pops up a basic authentication box, I type in the username and password, and then it bounces back with blank text boxes asking for it again. Every time when I type them in a second time it then lets me in! What's going on? Here's what I have in my server.xml:




Crazy. We have a Windows version and a Linux version of the database. I just changed my DSN over to the Linux one, and now it pops up 4 times. No, wait...sometimes it still logs you in just after 2 times, and sometimes it takes as many as 6! Also, sometimes when browsing the site, it makes you log in again in places where it didn't used to.

You see, we have a main database that drives our web app, but we've been using a MySQL db to authenticate, and we'd like to get rid of that so we can just deal with one database. However, this one is behaving strangely. Now, when clicking over to some of the other JSPs in the site, it will pop up and ask for the username and password in places it didn't used to do that (and no, it shouldn't be changing contexts or anything like that).
[ October 01, 2004: Message edited by: Stephen Huey ]
 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had this happen once when I was using Tomcat connected to Apache (named virtual server). I had two names specified for my domain www.mydomain.com and mydomain.com. I had them backwords so that when I typed in www.mydomain.com it would switch over to its default (without the www).
The authentication would request my information once for each domain (it is only valid in one domain).
Not sure if this is your problem but it is something to look at.

Hope this helps.
 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, that's not it, but thanks. All I've found out so far is that there may have been an authentication bug in my version of Tomcat, so I should try upgrading from 4.1.27 to 4.1.29 and see if that helps.
reply
    Bookmark Topic Watch Topic
  • New Topic