留言板建设中的小小总结

都是些微不足道的东西:1.where 字段名 is null
判断不为null 字段名 is not null
2.异常:
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Unknown Source)

这应该是你使用了Integer.parseInt(String)时, String类型的参数为null引起的,导致无法将字符串解析为int类型。

请检查一下你的字符串对象有没有正确的赋值。
3.foreign key(a_username) references account(username) on delete cascade on update cascade);
外键必须是另一张表的主键。

4.js中运用confirm提示框时异常出现stack overflow,说明函数名字有问题,改名即ok
5.清空session
<%
session.removeAttribute("loginUser");
session.removeAttribute("loginUserName");
session.invalidate();
out.print("<script>alert('用户即将退出,确定后退出该页面。');window.location.href='index.jsp'</script>");
%>
6.自动增长的id,输入时,值用null代替
7.其实网页错误小图标,一般为js代码有问题


猜你喜欢

转载自qpzm45678-163-com.iteye.com/blog/1037977