1

It seems basic thing but I couldn't figure it out after tried so long.

enter image description here

This is how my project structure. Following paths I have tried in my index.jsp but not able to load.

1) <script src="./resources/js/jquery-ui-1.12.1/jquery.js"></script>
<script src="./resources/js/jquery-ui-1.12.1/jquery-ui.js"></script>

2) <script src="../../../resources/js/jquery-ui-1.12.1/jquery.js"></script>
<script src="../../../resources/js/jquery-ui-1.12.1/jquery-ui.js"></script>

3) <script src="../../resources/js/jquery-ui-1.12.1/jquery.js"></script>
 <script src="../../resources/js/jquery-ui-1.12.1/jquery-ui.js"></script>

Can you suggest me on this? Thanks All !!

Error: enter image description here

4
  • Try this and see if it works <script src="../../js/jquery-ui-1.12.1/jquery.js"></script> Commented Nov 19, 2019 at 17:36
  • @HayesRoach no luck. Commented Nov 19, 2019 at 17:38
  • Ok, try to drag and drop the files into the JSP page, it should automatically show you the correct path. Commented Nov 19, 2019 at 17:43
  • @HayesRoach its shows src/main/webapp/resources/js/jquery-ui-1.12.1/jquery.js. But still same error. Commented Nov 19, 2019 at 17:46

1 Answer 1

0

I do not have enough reputation points to post a comment.

try to load the resources by following the server root.

If you start your link with a "/" the directory search will start at the server root.

So try "/resources/js/....."

Sign up to request clarification or add additional context in comments.

12 Comments

I think its simillar to ./resources/. No luck. <script src="/resources/js/jquery-ui-1.12.1/jquery.js"></script> <script src="/resources/js/jquery-ui-1.12.1/jquery-ui.js"></script>
Whats the error you get? Open the browser console and see. (ctrl + shift + I). Is it a not found (404) error?
You dont have jquery.js inside that folder!
Happy to help! Although no need to mark my answer as the "accepted". My original answer wouldn 't help. Credit the original author. Good luck
|

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.