*/
public void render() {
ServletOutputStream outputStream = null;
// 得到验证码对象,有验证码图片和验证码字符串
Captcha captcha = configurableCaptchaService.getCaptcha();
// 取得验证码字符串放入Session
String captchaCode = captcha.getChallenge();
if (logger.isDebugEnabled()) {
logger.debug("captcha:" + captchaCode);
}
//System.out.println(validationCode);
Session session = SecurityUtils.getSubject().getSession();
session.setAttribute(captchaName, EncriptionUtils.encrypt(captchaCode));
session.setAttribute(captchaName + "_time", new Date().getTime());
// CookieUtils.addCookie(request, response, AppConstants.CAPTCHA_NAME, EncriptionUtils.encrypt(captchaCode), -1);
// 取得验证码图片并输出
BufferedImage bufferedImage = captcha.getImage();
try {
outputStream = response.getOutputStream();
ImageIO.write(bufferedImage, "png", outputStream);
} catch (Exception e) {