|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
for some reason my <link> tags to css files are ignored in my jsp's. my styles are ignored and i get the defaults.
any ideas. |
|
#2
|
||||
|
||||
|
how do you know it only does not work for jsp's?
does the style file really exist? is it the correct path? did you consider the "\" and "/" ? Could you post some code to make this easier to understand? Is your CSS syntax correct? |
|
#3
|
|||
|
|||
|
hey
yeah...the thing is...i created the jsp without any java code, only html saved as a .jsp , thn when i started coding the Java into it, it started ignoring the css . so the CSS is fine, it worked, until i started adding the Java. is there a specific place where i have to add the <link> tag, eg. before the <body>, in the <head>? |
|
#4
|
|||
|
|||
|
maybe this is the problem :
when i access the jsp directly(typin in the path in browser), it applies the link style sheet. however, i access the jsp via a servlet with a RequestDispatcher, and when i do it this way it ignores the stylesheet. |
|
#5
|
|||
|
|||
|
the link tag goes in the head. Post your link tag. Is the URI a relative path? If so, relative to what - the document or the web root? One problem could be that you are not accounting for the context path of the app server.
|
|
#6
|
|||
|
|||
|
i tried different paths, it was relative path. the css file is in the root diretory of my web-app. i had the path as "transpay.css" , changed it to "../transpay.css" and now it works.
thanks for the help |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > CSS link in JSP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|