Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Re: Where to put js scripts on tomcat server...

Don Reese

2003-08-12

Replies:

Hi Jacob,

With your confirmation as to where the files should be, I was
able to track down the issue and it is now resolved. Case
sensitivity was the issue - fixed that and now all is well.

Don Reese

----- Original Message -----
From: "Jacob Kjome" <hoju@(protected)>
To: "Tomcat Users List" <tomcat-user@(protected)>
Sent: Monday, August 11, 2003 9:35 PM
Subject: Re: Where to put js scripts on tomcat server...


>
> It will be relative to the directory you see in your browser. For
> instance, if you have this...
>
> http://localhost:8080/mycontext/mypage.jsp
>
> The .jsp file below would be loaded from the root of /mycontext just like
> mypage.jsp is. The URL to it would be...
>
> http://localhost:8080/mycontext/filename.js
>
> 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...
>
> /webapps/mycontext/filename.js
>
>
> Jake
>
> At 08:48 PM 8/11/2003 -0400, you wrote:
> >Greetings,
> >
> >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"
> >src="filename.js"></script>
> >
> >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:
> >
> >webapps/*
> >webapps/myservlet/*
> >webapps/myservlet/WEB-INF
> >webapps/ROOT
> >webapps/ROOT/WEB-INF
> >
> >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: tomcat-user-unsubscribe@(protected)
> >For additional commands, e-mail: tomcat-user-help@(protected)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
> For additional commands, e-mail: tomcat-user-help@(protected)
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.