views:

28

answers:

2

Hello folks, this is a newbie question for you guys.

In file
/home/myhome/apache-tomcat-6.0.29/webapps/view/test.jsp

I have <link rel="stylesheet" type="text/css" href="WEB-INF/resources/view.css"/>

and the view.css file is located at
/home/myhome/apache-tomcat-6.0.29/webapps/view/WEB-INF/resources/view.css

For some reason, it's not loading the css file. But when I put the css file in the same directory as the jsp page and change href accordingly, it worked. What did I do wrong in my attempt to load the file from another folder?

Thanks alot.

+1  A: 

try

Firebug, to debug if path is correctly loaded or not. As i can see it issue with path so you have to debug.

But you can try with this line instead

<link rel="stylesheet" type="text/css" href="/view/WEB-INF/resources/view.css" />
JapanPro
A: 

Since I am using tomcat, I guess tomcat just won't let a page access anything in the WEB-INF folder, I moved the file else where not in WEB-INF, it worked...

if this worked voteup please
JapanPro