Spring application with embedded jetty can't find webdefault.xml if running from jar

前端 未结 6 513
伪装坚强ぢ
伪装坚强ぢ 2021-02-03 15:19

I have spring application which uses embedded Jetty instance.

project
   | src
      | controller
      | webapps
          | jsp
          | WEB-INF
                    


        
6条回答
  •  误落风尘
    2021-02-03 15:54

    Your webdefault.xml (Jetty) is missing:

    java.io.FileNotFoundException: d:\test\org\eclipse\jetty\webapp\webdefault.xml

    see "What is webdefault.xml?"

    If you have a custom location, you need to add it:

    context.setDefaultsDescriptor("/my/path/to/webdefault.xml");
    

提交回复
热议问题