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

  • Spring mvc resources problems - css images js

    Hi,

    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

    thanks

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

    Comment


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

      http://forum.springsource.org/showth...ht=#post383498



      and here
      https://jira.springsource.org/browse/SPR-8461

      let me know if you manage to solve it

      Comment


      • #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

        <mime-mapping>
        <extension>xml</extension>
        <mime-type>text/xml</mime-type>
        </mime-mapping>
        <mime-mapping>
        <extension>js</extension>
        <mime-type>text/javascript</mime-type>
        </mime-mapping>

        http://forum.springsource.org/showth...xml-extensions

        Comment

        Working...
        X