so in my login.jsp I used: href="stylesheet.css" or "./stylesheet.css" which works fine at very beginning however, after validation, it lost stylesheet uri. So, how can I use an absolute uri in my case?
Thanks a lot David
Joined: Jan 06, 2002
It seems I should use absolute uri for stylesheet like: /mywebapp/pages/stylesheet.css then it works on both beginning and after validation. Could someone explain me why? some reasons from struts?
So you are saying, when validation fails browser does not apply stylesheet? Is the url correct in the style tag? What is the servlet mapping for your action servlet and what are the relevant url's (of the action)?
Thank you for the reply. Yes, it seems the stylesheet can't be located by using relative path after validation. The files structure was listed in my original post, and in my login.jsp if I use: <link rel="stylesheet" href="config.css" type="text/css"> it works the first time login.jsp is invoked, however it can't find my stylesheet after validation found some errors. And same problem if I used: href="./config.css" I should use something like: <link rel="stylesheet" href="/mywebapp/pages/config.css" type="text/css"> then works both at the first time and after validation.