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: