来自球衣类的异常传播
有人可以给我一些关于如何从 jersey 类传播异常到 JSP 的指示吗?如果可能的话,还提供一些示例。
提前致谢 阿迪尔
Could some one give me some pointers as to how do i propogate an exception from jersey class to lets say a JSP, along with some examples if possible..
Thanks in advance
Adhir
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用运行时异常来传播异常。如果客户端是 Web 应用程序,JSR311 api 中的 WebApplicationException 也会为您执行相同的操作。
否则,检查异常就足够了
Use a Runtime exception to propogate the exception.. WebApplicationException in the JSR311 api does the same thing for you.. if the client is a web app.
Otherwise a checked exception would suffice