• 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

what is the URL ?

 
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi , i have a javascript file in following folder

D:\mytile2\WEB-INF\tiles\sales\js

then i include it into my layout.jsp (tiles)



but i couldn't get the call the object , can someone pls guide what i suppose to refer in the "src" ?

between , i also have try WEB-INF/tiles/sales/js , but it doesn't work


thank you
[ February 24, 2005: Message edited by: Alvin chew ]
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All files in WEB-INF are protected from public access.
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
files in /WEB-INF/ are protected and this means, that you can operate
this files only on server side in webapp.

when you output in html tag like this
<script src="/WEB-INF/tiles/js/js1.js"></script>

client browser must get source of js, but js is not accessible to
public.
So yo must put js out of WEB-INF directory, or you can include
it server side

<script type="text/javascript">
<%@include page="/WEB-INF/tiles/js/js1.js"%>
</script>
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you very much for answering
 
reply
    Bookmark Topic Watch Topic
  • New Topic