-
1. Re: Form Based Authentication with Stylesheet
jahratero Jan 17, 2008 2:57 PM (in response to jahratero)Hellooo....
No one can give some avise, please? -
2. Re: Form Based Authentication with Stylesheet
ragavgomatam Jan 21, 2008 8:08 AM (in response to jahratero)style class="header". Where is it declared in your style sheet ? Looks like your style sheet styles.css is not being picked up. Try opening the browser & type in
http://<your-host>:<port>/web-context/your-style-sheet.
It seems that your style sheet is under root location. So if this url displays your style sheet, then it should work. Else you have a issue with location of your style sheet -
3. Re: Form Based Authentication with Stylesheet
jahratero Jan 21, 2008 9:01 AM (in response to jahratero)Hello ragavgomatam,
First of all thanks for your reply.
I've tried putting "style class="header" instead of "class"header".
Unfortunately, no success.
When I point my browser to http://localhost:8080/numberG/pages/style.css it does present the stylesheet!
It looks indeed like my CSS is getting hold up somewhere, but I don't know the where or what is the issue.
This is my page:<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>ServiceCom MVS</title> <link rel="StyleSheet" href="/pages/styles.css" type="text/css"/> </head> <body style="background-image url(/bg-header.jpg)"> <p style class="header"> <h1>Please log in X</h1> </p> <form method="POST" action="j_security_check"> User Name: <input type="text" name="j_username" /><br /> Password: <input type="password" name="j_password" /><br /> <input type="submit" value="Login" /> </form> <TABLE> <TR><TH CLASS="TITLE">Loggie</TH></TR> </TABLE> <p style="color:blue"> This is the last line! </p> <p style class="header"> This is the last line! </p> </body> </html>
And this my CSS:BODY { background-color: #FDF5E6 } TH.TITLE { background-color: #FFAD00; font-size: 50px; font-family: Arial Black, Arial, Helvetica, sans-serif; } .header { color:blue; } .messages { color:red; font-family:tahoma; font-size:10px; } .inputs { font-size:60%; height:18; }
Both file are located in a 'pages' directory where also the WEB-INF directory is located.
You think that would be a problem?
-Yuri -
4. Re: Form Based Authentication with Stylesheet
jahratero Jan 21, 2008 5:20 PM (in response to jahratero)Hey everybody,
I know what the issue was.
In my web.xml I declared a security-constraint in which I gave up that
all my web contents are secured!
And my CSS and images are secured.
So by the time the loginpage request the CSS it will never get it because you're not authenticated yet.