This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes what is the URL ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "what is the URL ?" Watch "what is the URL ?" New topic
Author

what is the URL ?

Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
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 ]
Konstantin Chikarev
Greenhorn

Joined: Feb 19, 2005
Posts: 26
All files in WEB-INF are protected from public access.


http://antilogics.com/
Eugene Lucash
Ranch Hand

Joined: Feb 19, 2005
Posts: 77
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

Joined: Jan 08, 2004
Posts: 834
thank you very much for answering
 
Consider Paul's rocket mass heater.
 
subject: what is the URL ?
 
Similar Threads
problem with webapp directory structure
Prototype Ajax.Request error - Function Expected Options
Problem validating form with jQuery validation plugin
problem in running external java Script
Linking to so many jquery plugins