Deploy Static context in JBOSS with Spring 3

3 views
Skip to first unread message

Lei

unread,
May 17, 2013, 10:48:20 PM5/17/13
to programmin...@googlegroups.com
how to load the resources file which contained static files like javascript, css and images?

Lei

unread,
May 17, 2013, 10:50:59 PM5/17/13
to programmin...@googlegroups.com
The default folder of resourses is not correct in Eclipse JBoss studio, please put it under webapp folder(outside of web-inf folder) and adding the following things in the application context file in spring xml:

 <mvc:resources mapping="/resources/**" location="/resources/" />
<mvc:annotation-driven />
    
remember to modify every link in html files to make sure it comply the location specified in the above position:
like this: 
 <link href="<c:url value="/resources/css/bootstrap.css" />" rel="stylesheet"  type="text/css" />     
Reply all
Reply to author
Forward
0 new messages