web tips

数据库表单中很少用自增整型的,更多的设置一个随机的字符串:

User.setUid(UUID.randomUUID().toString());

使用重定向方式url地址不应写死,可以采用动态获取的形式:

response.sendRedirect(request.getContextPath()+"/login.jsp");

  

 

猜你喜欢

转载自www.cnblogs.com/kongieg/p/11072718.html