Hello, I'm new to Tomcat, and I am having an issue with setting up basic authentication for my app. I have the last Tomcat installed (6.0.32) and it is serving out a web application called Geoportal. To add an extra level of security I wanted to apply Basic authentication for this app and I successfully did so, the authentication login screen opens when I go to http://localhost:8080/geoportal/. However, after successfully signing into the page once I click to go to a new page in the app I makes me login once again.
What am I missing, I feel that once I sign in at the beginning it should retain my information in the memory so I don't have to re-authenticate. Could someone please help me with this or point me to a resource that could answer my question?
BASIC authentication doesn't use a login screen. Typically, the user's browser will pop up a modal dialog.
You didn't provide a lot of details, but I suspect that you wrote your own login code in the webapp. The security system in web.xml doesn't work with user-supplied login code, it employs login code that's part of the server itself (Tomcat). If you try and mix the 2 different types of security, unpredictable things can happen, but having a login that doesn't really log you in (as far as Tomcat is concerned) is not uncommon. And if Tomcat doesn't think you're logged in, it will continue to send login requests back to the user until you either attempt to access a non-secured resource (URL) or you log in properly.
Sometimes the only way things ever got fixed is because people became uncomfortable.
I didn't say it. I'm just telling you what this tiny ad said.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth