在jsp页面上打印错误堆栈
try{ .................... } catch(Exception e){ //定义一个流 ByteArrayOutputStream ostr = new ByteArrayOutputStream(); //把错误堆栈储存到流中 e.printStackTrace(new PrintStream(ostr)); //打印.... out.println(ostr.toString()); }
try{ .................... } catch(Exception e){ //定义一个流 ByteArrayOutputStream ostr = new ByteArrayOutputStream(); //把错误堆栈储存到流中 e.printStackTrace(new PrintStream(ostr)); //打印.... out.println(ostr.toString()); }