I am going to go insane. I have a web project using JSP and JQuery (which are included js files in the JSP pages). The only way I can get it to work is if I move ALL files to the same level as the WEB-INF folder. When I put them in a folder structure (mind you folders are ALSO the same level as the WEB-INF just in different folders) I keep getting the message JQuery is not defined. I have moved these files, folders all over the place and cannot get it to work except in that one scenario. Can someone PLEASE help me!!!
Here is the default.jsp (BTW the default.css has no problem loading)
P.S. Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.
You can go back and change your post to add code tags by clicking the button on your post.
Joined: Oct 21, 2002
Thanks for the reply Bear.
I used the request.getContextPath and it looks like it is resolving correctly (see below from firebug console)
but I am still getting JQuery is not defined.
and this for the <body> tag
and that works fine.
Any other thoughts would be greatly appreciated....
I am trying to do the tutorial and I just cut and paste the code from the above link.
Maybe the jQuery is a typo?? Is it defined somewhere?? How do I know, how can I track it down to see what it should be? I want to understand behind the code also.
I originally had the onLoad function coded in a file called test.js which I also tried to include and then call from the onload method in the body tag but then i was getting the additional error of 'onLoad() not defined'. Which makes me think for some reason it still isnt including the js files. Because when I coded it right in the head tags of the default page (previous post) it worked.
Joined: Oct 21, 2002
Anyway, sorry for the waste of time, but I did learn the proper way to include my js files so I guess it wasn't a total waste