开发者

webpage unable to load css file

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开发者_Go百科 from another folder?

Thanks alot.


try

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

  • http://www.ehow.com/how_2221659_debug-css-firebug.html

But you can try with this line instead

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


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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜