5 Replies Latest reply on Nov 16, 2004 6:42 PM by petethechop

    redirect to favicon after login?

    erikdhansen

      I set up user authentication through the database login module which appears to be working correctly in that the users are authenticated properly.

      However, after logging in, instead of being redirected to the original protected page (index.jsp) I started getting errors from Tomcat because of a missing favicon.ico file (404 - /favico.ico). Without authentication, this doesn't happen.

      I tried adding a favicon.ico (even though I don't really want one) and now my browser prompts me to save the favicon.ico file, but never redirects me to the original intended target page.

      If I edit the URL in the location bar to be the intended target (/index.jsp) after authenticating, I do get the correct page.

      Why does authentication bring out this problem, and why is JBoss/Tomcat delivering a 404 error for a non-mandatory file like favicon.ico?

        • 1. Re: redirect to favicon after login?
          starksm64

          Show the image tag for the favico.ico icon and indicate the jboss version.

          • 2. Re: redirect to favicon after login?
            erikdhansen

            I'm using jboss-3.2.1/tomcat 4.1.24. I don't have an image tag for the favicon.ico.

            I wasn't planning on adding a favicon.ico (so didn't have the tag) and got the 404. To try and remedy that, I added a favicon.ico in / and then jboss/tomcat found the favicon.ico, but my browser loaded it as if it was redirected to the .ico file instead of a web page.

            I had a similar situation when I tried to include a CSS in my login.html form login page -- after authenticating, rather than getting the protected page, I got the CSS loaded in the browser as a text file.

            • 3. Re: redirect to favicon after login?
              erikdhansen

              Some more information...

              After the initial login and getting the 404, if I logout and log back in, I am correctly redirected to the protected page. This appears to happen after the initial deployment only.

              I also tried two other browsers (Safari and Camino) and didn't see the problem (although Camino doesn't support favicons) -- so this happens with Mozilla Firefox.

              I tried 3 different scenarios (w/Mozilla):

              1) No html link for favicon.ico and no favicon.ico file present:

              After the 1st login, I get a 404 for favicon.ico.
              Subsequent logins work correctly until redeployment, where I get another 404 for the first login after deployment.

              2) favicon.ico in / with no link

              After the 1st login, I get a "Save To.../Open with..." dialog box for favicon.ico.
              Subsequent logins work correctly.

              3) favicon.ico in / with link (pointing to /favicon.ico)

              Same results as #2.

              • 4. Re: redirect to favicon after login?
                erikdhansen

                If it's not already obvious, I'm using OS X...as the server and client.

                • 5. Re: redirect to favicon after login?
                  petethechop