开发者社区> 问答> 正文

intellij javaWeb项目 运行的时候有错,为什么outPut中不打印错误??报错

1.我用的intellij ultimate 版本 14.0.2 

tomcat 8 

jdk 7 

2.我编写了一个Servlet的代码如下

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String name = request.getParameter("userName");
        String pwd =  request.getParameter("userPwd");
        System.out.print("start "); int a = 1 / 0;//这里应该报错的。。。 if( name.equals(pwd)){
            response.sendRedirect("/index.jsp?name=" + name);
        }else{
            response.sendRedirect("login.jsp");
        }

    }

3.intellij 中的debug中output 只打印了 start ,没有打印报错信息。这是怎么回事?outPut不打印错误信息吗?

 在界面上的报错信息是有的!

展开
收起
爱吃鱼的程序员 2020-06-14 14:43:10 677 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    tomcatlocalhostlog

    2020-06-14 14:43:25
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Spring Cloud Alibaba - 重新定义 Java Cloud-Native 立即下载
The Reactive Cloud Native Arch 立即下载
JAVA开发手册1.5.0 立即下载