• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Where to store css and js files in eclipse

 
Ranch Hand
Posts: 119
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Iam developeing jsp page in eclipse, my project is i wants to show some datas in tree structure, for that i used jquery now its fine but without internet it is not working, by useing some sites it takeing 2 js files and 2css files. now i got the css and js code but i don't know where i want to store the files. and the main thing is i need to mention the path of the css anf js file in my treestructure code. This is my first project so i don't know many things because iam new to developing filed, please guide me. below i have mention my code

<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<link rel="stylesheet" href="http://jquery.bassistance.de/treeview/demo/screen.css" type="text/css" />
<link rel="stylesheet" href="http://jquery.bassistance.de/treeview/jquery.treeview.css" type="text/css" />
<script type="text/javascript" src="http://jquery.bassistance.de/treeview/jquery.treeview.js"></script>
<script>
$(document).ready(function()
{
$("#example").treeview();
});

</script>
</head>


This is my code for tree structure, please anyone help me to solve my problem.


Thanks in advance.


Thank & Regards,
Jenifer Rajkumar.
 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It can reside in the same folder where your html/jsp page resides, or it can reside in any sub folder within that too. But accordingly to you have to specify the path.
 
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Deploy them in subdirectories under "[your-project]/WebContent". I usually name the subdirectories "js" and "css".
Then use relative paths like this:

If your web application URL is something like "http://localhost:8080/mywebapp", then a relative path like "css/screen.css" will be treated by browser as "http://localhost:8080/mywebapp/css/screen.css".

On a side note - for future reference - never link to other sites directly like you've done to http://jquery.bassistance.de, unless you have their permission or unless they state that the URL is available for public use.
It's called "hotlinking" - or more pejoratively, "leaching".
It's bad web etiquette, because you're making the owner of that private site serve your users. It'll increase their bandwidth costs, and the load on their servers.

 
Ranch Hand
Posts: 68
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes you can store any folder and sub folder where your html/jsp page reside.
if you store in the same folder you can just access it by giving the name.
e.g

if you have a sub folder named jsfolder


and if it is in one step back hierarchy
then


 
P Arunkumar
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have created sub folder and pasted the code but still it is not running.
 
P Arunkumar
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Thank You so much, now it is running successfully, thank for Your guide.
 
reply
    Bookmark Topic Watch Topic
  • New Topic