how do I catch errors globally, log them and show user an error page in J2EE app

后端 未结 2 1085
天命终不由人
天命终不由人 2020-12-06 23:05

I have searched this topic on google a bit and seen some best practices. But I need some specific advice. I am working on a J2EE app that has servlets/Struts2/Call to DAO\'

2条回答
  •  北荒
    北荒 (楼主)
    2020-12-06 23:54

    use java util logging package its easy to use can be declared with every property method at backend while on front end where you want to make error visible to user show it using h:message tag in xhtml or jsf or also with f:ajax error handling tag

提交回复
热议问题