How to mix server-side Jax-rs call with native files without prefix?

前端 未结 2 1324
攒了一身酷
攒了一身酷 2021-01-15 00:27

We are currently using a Jersey JAX-RS implementation to handle our REST requests (server-side Jersey). Our web.xml file is configured so all /rest/* requests are handled by

2条回答
  •  春和景丽
    2021-01-15 00:58

    This is pretty easy to achieve. Just register Jersey ServletContainer in web.xml as a filter (instead of servlet) - see the bottom of this page for an example - and either use ServletContainer.PROPERTY_WEB_PAGE_CONTENT_REGEX or ServletContainer.FEATURE_FILTER_FORWARD_ON_404 init param to make the static content accessible.

提交回复
热议问题