tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject Re: Where to put js scripts on tomcat server...
Date Tue, 12 Aug 2003 01:35:57 GMT

It will be relative to the directory you see in your browser.  For 
instance, if you have this...


The .jsp file below would be loaded from the root of /mycontext just like 
mypage.jsp is.  The URL to it would be...


Keep in mind that the <script> source path has nothing to do with servlet 
mappings and such.  It is resolved by the browser.  This means it 
definitely cannot be under WEB-INF since that is not directly accessible 
via a browser.  It is a server-side concept so only server-side code has 
access to it.  Here is where it would physically exist in your webapp...



At 08:48 PM 8/11/2003 -0400, you wrote:
>I assume this has been asked before, but I can't seem to track it down in
>the archives
>or any other document I have found.
>I am having trouble inserting a
><script type="text/javascript" language="javascript"
>into my HTML output and the browser being able to find the JS file.
>I have tried putting the js files into various directories but have not been
>successful in find the correct place.
>I have tried putting them in the following locations:
>but none of these fix the problem of the missing JS file in the brower.
>Any pointers on what I may be doing wrong (I assume that Tomcat can
>serve up the JS files just as it can my Image files).
>Thanks in advance,
>Don Reese
>To unsubscribe, e-mail:
>For additional commands, e-mail:

View raw message