页面显示一个500的错误

北梦的梦境 2019-05-24 09:57:21
type Exception report message An exception occurred processing JSP page /doadd.jsp at line 34 description The server encountered an internal error that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: An exception occurred processing JSP page /doadd.jsp at line 34 31: Statement stat=con.createStatement(); 32: String sp="/shipin/1.mp4"; 33: String sql="insert into sp (id,name,sp) values(9,'titanic',LOAD_FILE("+sp+"))"; 34: int r=stat.executeUpdate(sql); 35: if(r>0){ 36: response.sendRedirect("userlist.jsp"); 37:
...全文
107 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
离萧 2019-05-28
  • 打赏
  • 举报
回复
一看SQL语句有问题,不要用statement,用preparedstatement。
usecf 2019-05-28
  • 打赏
  • 举报
回复
把你String sql 值先打印下 看看结果 就知道你sql语句有没有写错
北梦的梦境 2019-05-25
  • 打赏
  • 举报
回复
引用 2 楼 雨田上的行者的回复:
sql语句执行有问题,单测一下改改就行了呗……
请问怎么改_(:з」∠)_我主要就是不太清楚怎么改,改了好几次都是这个错误
雨田上的行者 2019-05-25
  • 打赏
  • 举报
回复
sql语句执行有问题,单测一下改改就行了呗……
北梦的梦境 2019-05-24
  • 打赏
  • 举报
回复
请问这个怎么改啊_(:з」∠)_

58,454

社区成员

发帖
与我相关
我的任务
社区描述
Java Eclipse
社区管理员
  • Eclipse
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧