Brian Ehmann a écrit : > I have a myfaces app that is going to the testers on monday and I just > ran into a snag, so ANY help would be much appreciated. > > The app works great for all of the *.jsp pages. However I am using > container managed authentication on tomcat. When the user tries to > access any page before they are authenticated, they are forwarded to a > login.html page. The login functionality on the page works great, > however I can not get any of the images on that page to render and the > page does not find the css stylesheet. (this is what I get for > putting the eye-candy off until the last minute). > > This is my first myfaces app so I've pretty much followed the > architecture in the Core JSF (by sun) and Java Server Faces (by oreilly). > > Does anyone have any ideas? I can send code and overall design if > needed but I can't figure out what I am missing here. > > Thanks, > > Brian Hello,
First, this is not a jsf issue :) Second, if all of your webapp is under a security constraint requiring authentification (you have mapped a security constraint to '/' or to '/*' in your web.xml), nothing can be accessed without prior authentification, that includes your .css and your pictures. If you want pictures and css accessible from login page, they must be in a non secure area. Also, be aware that the url in browser, when doing login authentification, is always a special url (i can't remember which), not related to where the login.jsp or login.html page is. As such, if you have a <webapp>/resources/login.html and <webapp>/resources/my.css, then you CAN'T use the 'my.css' stylesheet, but use the '/<webapp>/resources/my.css'

