文件名称:AJAX-verification-code
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Text]
- 上传时间:
- 2013-01-17
- 文件大小:
- 4kb
- 下载次数:
- 0次
- 提 供 者:
- h**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
我们在做登录的时候往往会加上验证码,然后提交form表单到action验证,然而,传统的这种做法往往验证不通过,返回INPUT页面时,出现验证码图片不显示,并抛出空指针异常,遇到这种情况,通常的解决方法是将action页面跳转到input页面的时候定义成重定向,这样则可以解决图片不显示的问题,并不会抛异常,但验证错误信息和文本框输入信息却不会显示在返回页面,这只是我在实际中遇到的问题,当然,传统做法很可能还会带来诸多各种各样问题,AJAX的使用则彻底解决上述种种问题,下面是一个简易登录页面验证流程:
images.jsp-Login often coupled with verification code, and then submit the form form validation to the action, however, this practice often authentication fails, return to the INPUT page, the picture does not show the verification code, and throws the empty pointer exception, in which case, the usual solution is to jump to the action page defined as redirect input page of, so the picture does not show the problem can be solved, and not throw an exception, but the validation error message text box to enter information but will not be displayed on the return to the page, the only problem I encountered in practice, of course, the traditional approach is likely to also bring a lot of a wide range of issues, the use of AJAX solve the above problems, Here is a simple login page authentication processes: images.jsp,
images.jsp-Login often coupled with verification code, and then submit the form form validation to the action, however, this practice often authentication fails, return to the INPUT page, the picture does not show the verification code, and throws the empty pointer exception, in which case, the usual solution is to jump to the action page defined as redirect input page of, so the picture does not show the problem can be solved, and not throw an exception, but the validation error message text box to enter information but will not be displayed on the return to the page, the only problem I encountered in practice, of course, the traditional approach is likely to also bring a lot of a wide range of issues, the use of AJAX solve the above problems, Here is a simple login page authentication processes: images.jsp,
(系统自动生成,下载前可以参看下载内容)
下载文件列表
说明.txt