Jetty config without resourceBase

2019-09-04 08:02发布

I have a Scalatra with Jetty and it is serving REST API at the moment. No static context served at all. However, it seems I cannot skip setting resourceBase without getting

java.lang.IllegalStateException: No resourceBase or war set for context

Do I have to point it to some empty directory or is there some other option?

1条回答
对你真心纯属浪费
2楼-- · 2019-09-04 08:37

A resourceBase is required, and it is used for more than just static content.

It's also the location for configuration that the ServletContext needs.

Point it at an empty directory in your jar file if you don't even have that.

查看更多
登录 后发表回答