gpt4 book ai didi

java - org.apache.jasper.JasperException : An exception occurred processing

转载 作者:太空宇宙 更新时间:2023-11-04 09:07:51 24 4
gpt4 key购买 nike

org.apache.jasper.JasperException:第 [6] 行处理 [/login1.jsp] 时发生异常

3:     String email = request.getParameter("email");    
4: String pwd = request.getParameter("password");
5: Class.forName("com.mysql.jdbc.Driver");
6: Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/dbname","root","");
7: Statement st = con.createStatement();
8: ResultSet rs;
9: rs = st.executeQuery("select * from admin where email='" + email + "' and pass='" + pwd + "'");

最佳答案

错误消息表明您的行中有异常

Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/dbname","root","");

问题是执行该行时抛出异常。

您应该检查服务器日志异常原因。

如果您像 this 中那样配置错误页面,则可以获得有关错误的详细信息回答。

不可能使用给定的信息为您提供解决方案,但它可能是错误的连接 URL,缺少数据库的实际名称。

关于java - org.apache.jasper.JasperException : An exception occurred processing,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60015998/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com