javaweb项目http500错误

刚学习DAO设计模式碰到的问题。HTTPStatus500-AnexceptionoccurredprocessingJSPpage/AddUserDemo.jspatl... 刚学习DAO设计模式碰到的问题。HTTP Status 500 - An exception occurred processing JSP page /AddUserDemo.jsp at line 16type Exception reportmessage An exception occurred processing JSP page /AddUserDemo.jsp at line 16description The server encountered an internal error that prevented it from fulfilling this request.exceptionorg.apache.jasper.JasperException: An exception occurred processing JSP page /AddUserDemo.jsp at line 1613: User user = new User();14: user.setUsername("dao");15: user.setPassword("123");16: userDAO.insert(user);17: %>18: </body>19: </html>Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:574) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:461) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)root causejavax.servlet.ServletException: java.lang.Exception: 添加操作出现异常 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:909) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:838) org.apache.jsp.AddUserDemo_jsp._jspService(AddUserDemo_jsp.java:142) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)root causejava.lang.Exception: 添加操作出现异常 com.javaweb.ch13.UserDAOImpl.insert(UserDAOImpl.java:25) org.apache.jsp.AddUserDemo_jsp._jspService(AddUserDemo_jsp.java:126) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)note The full stack trace of the root cause is available in the Apache Tomcat/8.0.27 logs. 展开
 我来答
匿名用户
2016-08-27
展开全部
org.apache.jasper.JasperException: An exception occurred processing JSP page /AddUserDemo.jsp at line 16

13: User user = new User();
14: user.setUsername("dao");
15: user.setPassword("123");
16: userDAO.insert(user);
17: %>
18: </body>
19: </html>

该文件,16行出问题了 。。。。。。。
追问
我知道16行出问题了。可是出在哪了?
追答
捕捉了异常,不要替换掉,把原错误信息显示出来 。。。。。。。。。
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式