how to specify welcome-file-list in WebApplicationInitializer.onStartup()

前端 未结 4 1532
醉话见心
醉话见心 2020-12-10 02:30

Currently I have a web application where we are using web.xml to configure the application. The web.xml has welcome-file-list.

  
   ...
   &l         


        
4条回答
  •  孤城傲影
    2020-12-10 03:00

    You can't

    As specified in Java Doc

    public interface WebApplicationInitializer

    Interface to be implemented in Servlet 3.0+ environments in order to configure the ServletContext programmatically -- as opposed to (or possibly in conjunction with) the traditional web.xml-based approach.

    but you still need minimal configuration in web.xml , such as for

    
            index.jsp
    
    

提交回复
热议问题