Java QR code and Wechat

Source: Internet
Author: User

Java QR code and
Drop the downloaded jelly-core-1.7.0.GA.jar into the project, no need to write any java code, you just need to configure the relevant information in the project's web. xml file. The verification code is implemented based on Servlet and can be configured in web. xml. Custom styles are supported. The following table lists common configuration items:

Attribute name Attribute description Default Value Optional Value
Border Border No No, yes
BorderColor Border color Black RGB, color name
BorderThickness Border thickness 1 Value
Style Verification Code style Wave Wave)
Shadow)
FishEye)
Width Verification Code width (not recommended) 230 Value
Height Verification Code height (not recommended configuration items) 90 Value
FontSize Font size of the Verification Code (not recommended) 70 Value
FontColor Font color of the Verification Code Black RGB, color name
FontFamily Verification Code font Arial, Helvetica, Times New Roman, Liberation Mono Font Name
CharString Verification Code character NU N (random numbers)
L (random lowercase letters)
U (random uppercase letters)
NL (random numbers + lowercase letters)
NU (random numbers + uppercase letters)
LU (random uppercase/lowercase letters)
NLU (random numbers + uppercase/lowercase letters)
CharLength Length of Verification Code characters 4 Value
CharSpace Verification Code character interval gap 1 Value
NoiseColor Interference line color Black RGB, color name
SessionKey The Key of the Verification Code stored in the Session IdCode String
Ripple style Web. xml

ValidateCode
Org. jelly. image. ValidateCode


ValidateCode
/IdCode Jsp
  Result chart:
Shadow Style Web. xml

ValidateCode
Org. jelly. image. ValidateCode

Style
Shadow



ValidateCode
/IdCode Jsp
  Result chart:
Fish Eye Style Web. xml

ValidateCode
Org. jelly. image. ValidateCode

Style
FishEye



ValidateCode
/IdCode Jsp
  Result chart:
The QR code is implemented based on Servlet and can be configured in web. xml. Custom styles are supported. The following table lists common configuration items:
Attribute name Attribute description Default Value Optional Value
Size Image Size 7 Value
ImageType Image Type Jpg Png, bmp, gif, jpg, jpeg
Foreground Foreground color of the QR code Black RGB, color name
Background QR code background color White RGB, color name
ErrorCorrect QR code renewal rate H L (7%), M (15%), Q (25%), H (30%)
Use default Style Web. xml

Qrcode
Org. jelly. image. Qrcode


Qrcode
/Qrcode Jsp
  Result chart:

Style Web. xml

Qrcode
Org. jelly. image. Qrcode

Foreground
Pink



Qrcode
/Qrcode Jsp
  Result chart:

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.