Thanks for suggesting that I install my web application as ROOT. After doing this, everything has been working as I had hoped, except for one thing. When I enter my domain, an authentication form appears, as expected. I enter my username and password, and intead of being directed to my home page, the follow-up is a 404 message saying /favicon.ico is not available. I am wondering if this is something left over from the default ROOT directory. There is no reference to /favicon.ico within my web app.
After getting this 404 message, if I explicitly enter my home page's URL, everything from then on seems to be working well.
posted 11 years ago
I tried copying the favicon.ico from the original root into my root, and now after being authenticated, a web page displaying favicon.ico appears in my firefox browser instead of my home page.
I wonder if is causing the request for favicon.ico (something that I think browser's do automatically) to be trapped as your last request for a resource and trying to force that request through security.
Do you really need to check everything or could you use a less restrictive url-pattern (or series of url patterns)?
If not, I wonder if adding an explicit link to an icon will eliminate the automatic request by the browser...
I tried adding the <link ...> element, but that didn't help. As soon as I was authenticated, I was presented with the favicon.ico as my first page.
I removed the <link ...> element and altered my security constraint to match the following url patterns: <url-pattern>*.html</url-pattern> <url-pattern>*.class</url-pattern> <url-pattern>*.jsp</url-pattern> Once I did that, my problem with the favicon.ico went away, and the icon even appeared in the address field of my browser as it should.
I had set up my security constraint to be something like this originally when the site was being accessed as http://localhost:8080/myContext However I encountered a problem with my authentication form, which was a .jsp file. If I entered the URL as http://localhost:8080/myContext, I was challenged to authenticate, and everything worked fine. However, if I entered the URL as http://localhost:8080/myContext/ with a closing slash, I would authenticate, and then I would be presented the login.jsp form again. And if I filled it out a second time, I got a 404 error saying j_security_check was not available. That was worrying me, so I fiddled with the serurity-constraint element some more. But regardless, I always had the same difficulty if the URL was entered with a closing slash.
Now that I'm trying out the web app as ROOT, it doesn't seem to matter whether there is a trailing slash in the address, which is a relief.
Thank you for your help.
Deb [ January 24, 2008: Message edited by: deb platt ]
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?
Programmatically Create PDF Using Free Spire.PDF with Java