Error Page - how to print stack trace in JSP

后端 未结 2 1809
梦谈多话
梦谈多话 2021-01-04 23:16

I\'ve created exception handling in my Spring application using spring SimpleMappingExceptionResolver. Everything works fine. Now I need to somehow print the caught exceptio

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-05 00:04

    The easiest solution I can think of is to loop over the stack trace elements, taking advantage of the Throwable.getStackTrace() method:

    
        
    
    

    You'd need to add some formatting, of course.

提交回复
热议问题