Dave,
I believe the file is being found, but at this point, I am not certain of anything. A look thru the Apache access.log shows that http code 200 is returned the first time the servlet and the javascript file is accessed and a code of 304 is returned upon subsequent accesses. As I understand these codes, 200 means that everything was OK and 304 means that nothing in the file being served has changed since from the previous time it was served.
Other different files served from the same site seem to only return code 200 no matter how many times they are accessed. So, am I correct in believing that the return of code 304 for the javascript file is due to the fact that it is part of the servlet code that was compiled? I'm basing this on the servlet engine having to keep track of which servlets have been modified.
A look thru the Apache error log show no errors when the servlet and javascript file are accessed.
While I won't rule out the possibility of a package problem, I think that I would see error messages since the file wouldn't be found in the correct location. Since I don't see those, I am hoping the package naming and path info are correct. However, I could be vulnerable to having files located in the wrong directories. If javascript files need to be placed in specific directories I am not aware of which ones they need to go in. My servlet files are in the correct directories.
I have also looked at the servlet generated HTML as you suggested. A snippet is listed below.
html
head
SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT' SRC='/examples/GCImages/S1.js'
/SCRIPT
/head
body on_Load='rotate()'
...other html....
...other html....
/body
/html
(Sorry, but I have left out the carets in order to be able to respond to you)
My javascript file is S1.js and the function rotate() is defined in the file.
Should the javascript actually be printed out in the HTML source? I'm getting blank lines where I would expect the javascript to appear.
Do the blank lines help to indicate anything about the problem?
The number of blank lines doesn't equal the number of statements in the javascript file or anything else I can recognize, so I don't know where they come from.
I have literally copied the javascript from a
test servlet where the javascript was included as part of the servlet source. Once I got this to work properly, I cut the javascript lines out, put them in the SI.js file and changed the servlet to add the SRC='/examples/GCImages/S1.js' reference. After recompiling the servlet and placing both files in their respective directories, I tried to run the servlet again.
So, this raises the question of whether my process was correct. Could I have introduced inadvertant errors by following this process? Do I need to change any of the statements? Do I need to use the less than inequality symbol rather than the characters that represent the symbol?
I can't try your example until later, as the system is being used for a demo, but I'll have access later.
Again, thanks for all your help, it is very much appreciated.
Jim