I have created my dynamic web project in Eclipse. Since my UI use javascript jQuery, I have download the jQuery API, I am wondering where to put it in my eclipse project?. Under which directory? is there any configurations for the jQuery API inside eclipse?
JavaScript . js files are placed under the js sub-folder and any image files such as . jpeg or . png are placed in the images sub-folder.
I'm not quite sure if you just want to know how to provide jQuery for your WebApplication or if you want to be able to develop JavaScript applications with jQuery and have autocompletion for doing so.
To use jQuery in your WebApp you can put it somewhere in the WebContent folder. I usually create a "scripts"-folder where I have all the js files.
You can then link from your servlet / html file... or whatever to the js file. E.g. you have an index.html in the WebContent directory then you would use the path scripts/jquery.js to link to the js file in the scripts folder.
I hope this was some help to you.
br, Chris
It's up to you where you put it. Once you decide on somewhere include jQuery with script tags on which ever pages you want it. For example:
<script type="text/javascript" src="/path/to/jquery/jquery-1.4.4.min.js"></script>
Obviously the name and version of your jquery .js might be different so update where necessary.
create a new folder in your existing project as example script and place jquery.js file.
To include the file in programming just give the path as:
<script type="text/javascript" src="/script/jquery/jquery-1.4.4.min.js"></script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With