首页 新闻 会员 周边

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

0
悬赏园豆:10 [待解决问题]

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不打印错误信息吗?

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

守恪的主页 守恪 | 菜鸟二级 | 园豆:214
提问于:2015-07-09 15:12
< >
分享
所有回答(1)
0

hello,我也遇到了这个问题,请问你是怎么解决的。?

lnqdyy121601 | 园豆:202 (菜鸟二级) | 2018-06-05 10:56
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册