Dec 31st, 2011, 09:50 PM
This is what I have done so far.
1) Under webapp, I created a js folder. Inside I put a jquery.js and a myscript.js
In one of my jsp pages, I'm trying to a call a function inside myscript.js, but it doesn't work. I tried many different paths, but still the problems persists.
Inside myscript.js there is a function called hello for testing purposes.
Inside addUser.jsp there is a declaration
And a call to a method..
It doesn't call the function. If i put the hello function inside the jsp, it works, but I don't want it in the same file.
Any ideas guys?
Dec 31st, 2011, 10:28 PM
Solved it. Anyone else that has problems this is what I did.
Under spring.xml, which is probably your: projectname-servlet.xml
<mvc:resources mapping="/js/**" location="/js/" />
Create a folder named js under webapp, but not in the WEB-INF directory.
Put your .js files in there
access your js files via.....
Bon Voyage and happy new year.