How to access static resources when mapping a global front controller servlet on /*

前端 未结 19 2358
轮回少年
轮回少年 2020-11-22 07:35

I\'ve mapped the Spring MVC dispatcher as a global front controller servlet on /*.

               


        
19条回答
  •  萌比男神i
    2020-11-22 08:19

    In Embedded Jetty I managed to achieve something similar by adding a mapping for the "css" directory in web.xml. Explicitly telling it to use DefaultServlet:

    
      DefaultServlet
      org.eclipse.jetty.servlet.DefaultServlet
    
    
    
      DefaultServlet
      /css/*
    
    

提交回复
热议问题