was7 抛出 servletException 未记录在 SystemOut.log 文件中
我正在使用部署在 Websphere Application Server 7 上的代码,该代码抛出 ServletException,如下所示:
if (BaseConvertors.isEmpty(email)) {
throw new ServletException("Invalid url access - not authenticated.");
}
email
是一个 String
。
当我在 Eclipse 中调试 servlet 时,我看到控制台中打印出堆栈跟踪。但 SystemOut.log
文件中没有任何异常指示。此代码位于 doGet 方法内部,该方法本身会引发异常。
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {}
如何将异常记录到 SystemOut.log 文件中?
I am working with code deployed on Websphere Application Server 7 that throws a ServletException as follows:
if (BaseConvertors.isEmpty(email)) {
throw new ServletException("Invalid url access - not authenticated.");
}
email
is a String
.
When I debug the servlet in Eclipse, I see the stack trace printed out in the console. But there is no indication of the exception in the SystemOut.log
file. This code is inside the doGet
method which throws the exception itself.
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {}
How do I get the exception to be logged in SystemOut.log
file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
错误被记录到 SystemError.log 中……呃!
The error gets logged into SystemError.log ... duh !