I\'m using a jsp file as a model from a Controller and I want to use an css styles and js libraries
The problem is that your requests for CSS and JS files are going through Dispatcher Servlet, which is not correct. Hence Spring won't find the mapping for those files it will not load them.
You need to add the resourceHandler for your application in the applicationContext.xml file as follows. This configuration will bypass the requests for CSS and JS files from the Dispatcher Servlet.
<mvc:resources location="/assets/" mapping="/assets/**" />
Hope this helps you... Cheers.
Please put following code in web.xml
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.css</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.js</url-pattern>
</servlet-mapping>
Auto-solved:
This mapping is blocking everything, I change this:
<servlet-mapping>
<servlet-name>MyProject</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
For this (and I change my calls to "call.do"):
<servlet-mapping>
<servlet-name>MyProject</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
And it works!