错误-The server encountered an unexpected condition that prevented it from fulfilling the request

错误展示

错误-The server encountered an unexpected condition that prevented it from fulfilling the request_第1张图片
错误-The server encountered an unexpected condition that prevented it from fulfilling the request_第2张图片

错误分析

1.dao层错误

当dao层的连接重复,且没有关闭时,会出现这个错误;
解决方法
在finally代码块中关闭连接;但要注意判断参数是否为空,可能会报NullPointException异常;
错误-The server encountered an unexpected condition that prevented it from fulfilling the request_第3张图片

2.前端jsp错误

当jsp页面错误时,会导致无法编译jsp,也会出现这样的错误,这个情况是非常狗的,因为jsp错误不会直接显示(烦)

你可能感兴趣的:(项目练习,jsp,java,mysql,bug)