-
Aug 3rd, 2011, 03:23 PM
#1
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
-
Oct 25th, 2011, 04:01 PM
#2
Did you ever get a resolution? Fairly new to Spring and having the same issue.
-
Oct 26th, 2011, 07:16 AM
#3
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
-
Oct 26th, 2011, 03:45 PM
#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
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
-
Forum Rules