I made a website project. But now i meet a problem. I cannot get the path of css and js file no matter what I do. Just like this:
<link type="text/css" rel="stylesheet" href="ckplayer/css/ckplayer.css" />
<script type="text/javascript" src="ckplayer/js/ckplayer.min.js" charset="UTF-8"></script>
And
<link type="text/css" rel="stylesheet" href="/ckplayer/css/ckplayer.css" />
<script type="text/javascript" src="/ckplayer/js/ckplayer.min.js" charset="UTF-8"></script>
And
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}\ckplayer\css\ckplayer.css" />
<script type="text/javascript" src="${pageContext.request.contextPath}\ckplayer\js\ckplayer.js" charset="UTF-8"></script>
What should I do?Any help would be appreciated.
The folder structure is as follow:
2.pages [1]:video (1)video.jsp
Seems like your second try should work based on the folder structure you are showing. Hard to say for sure.
If your page is at:
/pages/video/video.jsp
then
/ckplayer/css/ckplayer.css
looks correct as they both reference from the root.