• 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

JavaScript directories

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

This may sound like a trivial question but where do I store my JavaScript files? Is there a convention that everyone follows?
I have a Tomcat 5.5.17. Also using MySQL and JSF.
Thanks in advance for your thoughts.
Regards
Zein
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I usually store it in WEB-INF\JScript\ folder. Basically I don't keep them along with class files.

Although you can keep it inside WEB-INF itself without any directory, but I guess it's better to follow a clean approach.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Animesh Saxena:
I usually store it in WEB-INF\JScript\ folder.



How does this work? The servlet container won't serve any files out of WEB-INF. Do you use a servlet that streams the JS files to the client? That would seem a bit pointless, as direct access would work just as well. I guess I'm missing something here.
 
Zein Nunna
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I've stored by JavaScript files in Root/jscripts/...., I suppose this way they can be accessed directly as the location of the JS files is visible when you right click and view source in your browser. Is this safe? Or does it not matter?


Regards
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Zein Nunna:
I suppose this way they can be accessed directly as the location of the JS files is visible when you right click and view source in your browser.



If you can't see it, nether can the browser.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic