Announcement Announcement Module
No announcement yet.
Spring mvc resources problems - css images js Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring mvc resources problems - css images js


    we have a apring mvc web app with javascript, css and images. We had the all these things in a resources folder just above the web-inf folder and everything was working fine in Jetty and tomcat. Then we switched to weblogic, with our web app in a war in an ear.

    No js, or css were found. Even with the <mvc:resources> its still didnt work. Eventually we had to put the lot inside the WEB-INF/classes directory and add
    <mvc:resources mapping="/resources/**" location="classpath:resources"/>

    this seems to work except now we have discovered that images are not geting found in there either - for example inside web-inf/classes/resources/js we have a jquery/jqueryui installation. and its not displaying images on any of its widgets because they are not resolving properly.

    I have read many posts on the <mvc:resources subject, but none seem to work. We are mapping /* to the spring dispatcher servlet

    hoping someone can help


  • #2
    Did you ever get a resolution? Fairly new to Spring and having the same issue.


    • #3
      no but I did an apparent fix that I asked for help on, see thread here:

      and here

      let me know if you manage to solve it


      • #4
        Weblogic needs explicit configuration of the mime-type for certain extensions.

        Adding the following to web.xml resolved the issue for me. check the thread below