How to handle static content in Spring MVC?

前端 未结 23 3021
春和景丽
春和景丽 2020-11-22 03:28

I am developing a webapp using Spring MVC 3 and have the DispatcherServlet catching all requests to \'/\' like so (web.xml):

  
          


        
23条回答
  •  梦谈多话
    2020-11-22 04:12

    In Spring 3.0.x add the following to your servlet-config.xml (the file that is configured in web.xml as the contextConfigLocation. You need to add the mvc namespace as well but just google for that if you don't know how! ;)

    That works for me

    
    

    Regards

    Ayub Malik

提交回复
热议问题