【发布时间】:2016-08-26 03:35:21
【问题描述】:
我有几个问题。
- WebAppContext 和 ServletContextHandler 的主要区别是什么。
- 我的应用程序有页面和安静的服务。 ServletContextHandler 是否可以用于 Rest 服务而不是 WebAppContext? (也就是说,ServletContextHandler 是否更好地处理 servlet 来管理对 RESTful 服务的调用/请求?但是我遇到过使用 ServletContextHandler 运行 JSP 的情况)有什么优点和缺点?
- 如果我使用两个上下文是否有任何缺点:WebAppContext 加载 JSP 和其他静态内容(如 js、css)和 ServletContextHandler 处理对 restful 请求的请求?
【问题讨论】: