I got this error on the Google Chrome's console when navigating on my WebApp:
GET http://localhost:8080/Bichos/slider/js/jquery.js 404 (Not Found)
GET http://localhost:8080/Bichos/slider/js/slider.js
GET http://localhost:8080/Bichos/slider/images/arrow-left.png
GET http://localhost:8080/Bichos/slider/images/arrow-right.png
This is the folder structure:
---Bichos
|
`---- Web Pages
|
|---- WEB_INF
|
|---- css
| |---- fonts.css
| `---- default.css
|
|---- images
| |---- a.png
| `---- b.png
|
|---- pages
| |---- admin.xhtml
| `---- index.xhtml
|
|---- resources
| `---- css
| `---- pstyle.css
|
|---- slider
| |---- images
| | |---- arrow-left.png
| | `---- arrow-right.png
| |---- js
| | |---- jquery.js
| | `---- slider.js
| `---- index.html
|
`---- principal.xhtml
The application is JSF 2.1, i heard that the Faces Servlet config at the web.xml file could be a factor, so this is the actual config:
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
The pages located at /pages/admin.xhtml and /pages/index.xhtml work properly referencing to each other and the principal.xhtml too.
When visiting the /slider/index.html file (With URL http://localhost:8080/Bichos/slider/index.html), seems to be loading the style sheet referenced by:
<link rel="stylesheet" href="style.css"/>
But these references are not loaded:
<script src="js/jquery.js"></script>
<script src="js/slider.js"></script>
I try to access to these file through the URL http://localhost:8080/Bichos/slider/js/jquery.js, but get the 404 status.
I'm a little stuck, and almost sure that the solution lies on the servlet-mapping but I don't know for sure.
The environment used is Glassfish 4.0, JSF 2.1 (Facelets), PrimeFaces 5.0.
Please help, and thanks in advance.