Results 1 to 4 of 4

Thread: Spring mvc resources problems - css images js

  1. #1

    Default 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. #2
    Join Date
    May 2011
    Posts
    21

    Default

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

  3. #3

    Default

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

    http://forum.springsource.org/showth...=#post383 498



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

    let me know if you manage to solve it

  4. #4
    Join Date
    Aug 2011
    Posts
    5

    Default

    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •