Annotated form: Spring3.2 MVC + Hibernate3.6 Integration (Basic)

Source: Internet
Author: User

    • Create a Web project (there is no more to say here, since all started using SH, then I believe you have been using Java for some time)
  • Download the jar package, here to provide my network disk, save everyone to find
        hibernate3.6:Http://yunpan.cn/csdyPZvcbunad Access Password 0c53        spring3.2:Http://yunpan.cn/csdyME836dvYA Access Password 07C2


  
 
  1. public void regCode(HttpServletRequest request,
  2. HttpServletResponse response) throws IOException {
  3. // 配置头文件属性
  4. confBaseHeader(response);
  5. // 生产验证码信息
  6. String captchaText = CaptchaProducer.createText();
  7. BufferedImage captchaImage = CaptchaProducer.createImage(captchaText);
  8. OutputStream os = response.getOutputStream();
  9. request.getSession().setAttribute("regCode", captchaText);
  10. ImageIO.write(captchaImage, IMAGE_TYPE, os);
  11. closeStream(os);
  12. }



From for notes (Wiz)

Annotated form: Spring3.2 MVC + Hibernate3.6 Integration (Basic)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.