I am developing Spring web application. my application package structure is
web/----|
|WEB-INF/
|-jsps/
|-scripts/
|-styles/
|-web.xml
It is Spring MVC
& maven
based project. I have to use the external javascript
file in jsp
file.
if I use <script src="/scripts/MyFile.js"/>
is not working as the resource is inside WEB-INF
.
I have tried so many ways but I could not find solution.
So could you please tell me how to access external javascript
file from JSP
file.
Note: I cant change my Directory Structure
as it is specification. And I should only use external javascript files.
So could you please provide solution. Thanks in adavnce.
You can configure (see: here):
Then reference it like: