The problem which I addressed is that I'm trying to add javascript file to use it in certain page in my project, I built the project with only one servlet and many controllers using the annotations and reflection.
I set two url-mappings:
<servlet-mapping>
<servlet-name>ServletManager</servlet-name>
<url-pattern> *.* </url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ServletManager</servlet-name>
<url-pattern> / </url-pattern>
</servlet-mapping>
the first one for mapping the resources and the second one for mapping the http request (note: the project has only one servlet and many controllers)