FireFox gave me this error
[07:03:42.319] GET http://localhost:8080/Grid_Sample/editablegrid-1.0.11.js [HTTP/1.1 404 Not Found 2ms]
I tried placing the.js file rite next to my jsp but still i got this error ?? Any suggestions on what the path should be ??
I am using eclipse and i also run and test my jsp files through eclipse
Okay i did a little experimentation and i came up with the following. If i place the file directly in the webcontent folder using windows explorer it doesnt work.
Now is there any way to just specify a path instead of pasting all the time and how would i link css files ??
By placing the file there in Explorer, Eclipse was not aware of its existence. Therefore, it never copied the .js file over to the deployed WAR. You need to inform Eclipse that the file is there. You can do it either the way you said (copy into Eclipse) or after copying via Explorer, hit F5 to refresh your project.
Moral of the story: if the file does not show up in the package view in Eclipse, the file does not exist within your project!
Your files, including CSS, must all be in the WebContent directory. Actually, they really just need to be in the deployed WAR file. So if you don't want to copy those files into your project, you should look into using a build tool such as Ant or Maven to build the WAR.
subject: How to access a java script file in my jsp while rnning through eclipse