• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apply css when jsp is under WEB-INF folder

 
Mike Nason
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
When my JPS files are in WEB-INF/jsp (preventing to access them directly) I can't apply css files to them!

I wrote <link rel="stylesheet" type="text/css" media="screen" href="../../styles/global.css"> - it doesnt work!

Where can I put css files and how to link them from jsp?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64990
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should not be using page-relative addressing in any JSP, regardless of whether it's under WEB-INF or not.

See the JSP FAQ for information on forming proper server-relative URLs for images, stylesheets and the like.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic