• Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to link CSS file to a JSP file.  RSS feed

 
Dushyant Shukla
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had started a web project in java with eclipse.....The problem is I am unable to get a css file linked to the jsp page I have designed....
The following is my directory structure:

theFacebook
-WebContent
-----css
--------style.css
-----jsp
--------index.jsp
-----images
--------facebooklogo.jpg
--------fevicon.ico
-----META-INF
-----WEB-INF

and the link tags I have used in my jsp file are as follows:



When I deploy the jsp file in Tomcat it shows the HTML page as it is with no effect of the CSS whatsoever with none of the three tags working.
Please help.


 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66144
144
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your href is wrong. It should be a seder-relative URL starting with the context path. See the JspFaq for more info.
 
Dushyant Shukla
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!