Jetty config without resourceBase

拥有回忆 提交于 2019-12-12 01:36:18

问题


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:


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.



来源:https://stackoverflow.com/questions/36615826/jetty-config-without-resourcebase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!