0

I import my css file and javascript files in index.xhtml

<script type="text/javascript" src="resource/js/bag.js"></script>

My project works like this in http://localhost:8084/Proje1/ . But when i open http://localhost:8084/Proje1/faces/index.xhtml this url, doesn't work. It doesn't find css file and jquery files. How can i fix this. Thank you.

1
  • Checked the network tab of your browser for 404's This is not netbeans related bit servlet container (and not a specific one) Commented Jul 11, 2017 at 18:35

1 Answer 1

1

Place your resource folder under WebContent, and replace your <script> import with this:

<script src="#{request.contextPath}/resource/js/bag.js"></script>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.