wood burning stoves 2.0*
The moose likes Struts and the fly likes CSS not being recognized.. Struts application .. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "CSS not being recognized.. Struts application .. " Watch "CSS not being recognized.. Struts application .. " New topic
Author

CSS not being recognized.. Struts application ..

Vic Hood
Ranch Hand

Joined: Jan 05, 2011
Posts: 477

Hi ,
I was developing a web project based on struts . I developed individual jsp include files for different sections of the main layout and placeed the css file in a separate folder ./includes/css .However now , the css is not being reflected onto the jsp pages . It maybe a very simple issue . but its baffling me . . I ve attached a screen shot of the directory structure . And the code for the jsp and the css .Please advise.

Thanks in advance.


JSP--







[Thumbnail for DirectoryStructure.JPG]


Learning and Learning!-- Java all the way!
srikanth arroju
Ranch Hand

Joined: Aug 02, 2006
Posts: 66
i could not find includes as a folder in Your application. if includes is a app/WAR name then your referencing a link is correct
Vic Hood
Ranch Hand

Joined: Jan 05, 2011
Posts: 477

Hi Srikanth ,
Thanks for the reply. But i dont understand what you mean .The file path to the css file is set properly if that is what you meant .
Any further help would be great.
Shashank Ag
Ranch Hand

Joined: Dec 22, 2009
Posts: 88

you are writing wrong path to css it should be

<link rel="stylesheet" href="/css/WSS.css" type="text/css"></link>


SCJP 91%, SCWCD 97%
Shashank Ag
Ranch Hand

Joined: Dec 22, 2009
Posts: 88

srikanth arroju wrote:i could not find includes as a folder in Your application. if includes is a app/WAR name then your referencing a link is correct

Srikanth Arroju you are wrong about this. You can either write full url or relative url in href but not half url.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: CSS not being recognized.. Struts application ..