随机验证码源代码详解

时间:2012-01-26 07:40:53
【文件属性】:

文件名称:随机验证码源代码详解

文件大小:67KB

文件格式:RAR

更新时间:2012-01-26 07:40:53

验证

随机获取验证码 public class CheckNumberServlet extends HttpServlet { // private static final String CONTENT_TYPE = "text/html; charset=GBK"; private static int WIDTH = 93; private static int HEIGHT = 25; public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //response.setContentType(CONTENT_TYPE); response.setContentType("image/jpeg"); //设置浏览器不要缓存此图片 response.setHeader("Pragma", "No-cache"); response.setHeader("Cache-Control", "on-cache"); response.setDateHeader("Expires", 0); //获取流对象向客户端写入图片 ServletOutputStream sos = response.getOutputStream();…………………………………………………………………………………………


【文件预览】:
随机验证码
----checknumber()
--------Tomcat()
--------imageCounter.jpx.local~(2KB)
--------Servlet.library(219B)
--------imageCounter.jpx.local(2KB)
--------bak()
--------src()
--------imageCounter.jpx(8KB)
--------webroot()
--------classes()

网友评论