structs+spring+hibernate随笔

                                                                                           jsp密码保护及登录验证

1.jsp起始就是servlet,在一个servlet中不能同时使用getWrite()与getOutputStream(),jsp文件默认使用的是getWrite()。

      如果非要使用,2个解决方案。@1,将getOutputStream()替换成getWrite()。@2,在使用getOutputStream()之前关闭out,  <%out.clear();
out = pageContext.pushBody();%>

2.图片点击,重新加载

  

  img.setAttribute("src","img/o.gif?"+Math.random());
3.贴验证码,引入image.jsp

  <img  src="jsp/image.jsp">
 

 4.<!-- cellspacing加行间距 -->table

5..js正则表达式,var reg=/^...$/               //最好2段都加上开头以什么^,结束以什么$,防止只匹配中间段, js不存在equals(),取对像值value<prop key="hibernate.id.new_generator_mappings">false</prop>

猜你喜欢

转载自blog.csdn.net/qq_25717027/article/details/75213774