[Super convenient] Create Web QR Code with One Tag

There may be occasions when you happen to need to create barcodes and QR codes. For Java, I often use barcode4j and zxing. Pass a string to the class and receive an image. In the case of the web, it is all about displaying the image on the web screen. Since it is basically a "routine task", I thought it would be a good idea to automate it, so I combined it into one tag.
# Get Jar
```xml
<dependency>
    <groupId>io.github.efwgrp</groupId>
    <artifactId>efw</artifactId>
    <version>4.07.029</version>
</dependency>
```
```xml
<dependency>
    <groupId>net.sf.barcode4j</groupId>
    <artifactId>barcode4j</artifactId>
    <version>2.1</version>
</dependency>
```
```xml
<dependency>
    <groupId>com.google.zxing</groupId>
    <artifactId>core</artifactId>
    <version>3.5.3</version>
</dependency>
```
```xml
<dependency>
    <groupId>com.google.zxing</groupId>
    <artifactId>javase</artifactId>
    <version>3.5.3</version>
</dependency>
```
# How to Write Jsp
Set the URL of the img tag to drawServlet, specify the type and msg, and receive the image. Strictly speaking, it's not a customization tag, but a servlet.
```javascript
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="efw" uri="efw" %>
<!DOCTYPE HTML>
<HTML>
<HEAD>
	<title>barcode テスト</title>
	<efw:Client lang="jp"/>
	<style>img{vertical-align:middle}</style>
	
</HEAD>
<BODY>
qrcode　<img src="drawServlet?type=qrcode&msg=hellword" height="150px">　
codabar　<img src="drawServlet?type=codabar&msg=0123456789" height="60px">　
code39　<img src="drawServlet?type=code39&msg=0123456789" height="60px">　
code128　<img src="drawServlet?type=code128&msg=0123456789" height="60px">　
2of5　<img src="drawServlet?type=2of5&msg=0123456789" height="60px">　
itf14　<img src="drawServlet?type=itf14&msg=01234567891231" height="60px">　
ean13　<img src="drawServlet?type=ean13&msg=1234567890128" height="60px">　
ean8　<img src="drawServlet?type=ean8&msg=12345670" height="60px">　
upca　<img src="drawServlet?type=upca&msg=012345678905" height="60px">　
upce　<img src="drawServlet?type=upce&msg=01234565" height="60px">　
rmcbc　<img src="drawServlet?type=rmcbc&msg=0123456789" height="60px">　
postnet　<img src="drawServlet?type=postnet&msg=0123456789" height="60px">　
usps4cb　<img src="drawServlet?type=usps4cb&msg=0123456709498765432101234567891" height="60px">　
pdf417　<img src="drawServlet?type=pdf417&msg=0123456789" height="60px">　
datamatrix　<img src="drawServlet?type=datamatrix&msg=0123456789" height="150px">　
</BODY>
</HTML>
```
# Result of execution
The following is what I created.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3476221/6248248a-c378-18fb-4d0a-275316c0f12b.png)

Among various codes, only QR code accepts parameters of numbers, alphabets, kanji, and symbols. This allows you to express URLs and has a wide range of uses.

# Attachment, Code Type Explanation
<table>
<tr><th>Type</th><th>Explanation</th></tr>
<tr><td>qrcode</td><td>QR (Quick Response) code is a matrix-type two-dimensional code developed by Denso Wave (Japan) in 1994. It has the characteristics of extremely fast reading speed and the ability to store large amounts of data. Also, since the code was developed in Japan, it can efficiently express kanji and other characters. Therefore, it is widely used not only in Japan but also in countries and regions other than Japan that use kanji (China, South Korea, Taiwan, Hong Kong, etc.).
</td></tr>
<tr><td>codabar</td><td>NW-7 is a relatively early barcode developed by Monarch Marking Company (USA) in 1972. In Japan, it is mainly called NW-7, but it is also sometimes called CODABAR or Code 2 of 7. NW-7 uses seven bars and spaces of Narrow and Wide widths to represent one character, and this feature is the origin of the name. Due to the relatively simple construction of binary-level barcodes, high precision printing is not required.
</td></tr>
<tr><td>code39</td><td>Code39 is a barcode developed by Intermec (USA) in 1975. Code39 uses nine bars and spaces (three of which are thick elements) to represent one character, and this feature is the origin of the name. Due to the relatively simple construction of binary-level barcodes, high precision printing is not required.</td></tr>
<tr><td>code128</td><td>Code128 is a barcode developed by Computer Identics (USA) in 1981. In order to correspond to computer input, it can express 128 characters of ASCII code, and 128 is the origin of the name. Due to its high information density and reliability, it is widely adopted in the industrial field as an alternative to Code 39.</td></tr>
<tr><td>2of5</td><td>Code 2 of 5 (Industrial 2 of 5) is the oldest barcode still in use, developed in 1970 by Identicon (USA) and Computer Identics (USA). is. This name comes from the fact that five bars (two of which are thick bars) are used to represent one character. It was originally used for industrial purposes, but it is now rarely used in the industrial field due to its low information density and inability to represent the alphabet. Various barcodes were developed from Code 2 of 5 because of its very simple configuration.</td></tr>
<tr><td>itf14</td><td>ITF is a barcode developed by Intermec (USA) in 1972. While conventional barcodes only represent characters using bars, ITF can also represent characters using spaces, so it has a high information density and was adopted as the standard symbol for packaging and delivery in the United States in 1981. ITF stores data in the spaces between (1) bars (Interleaved: between), and (2) five bars or spaces (two of which are thick) to represent one character. It has the characteristic that it uses elements), and this characteristic is the origin of the name.</td></tr>
<tr><td>ean13</td><td>EAN-13 is a widely recognized barcode in Europe, used in supermarkets and other retail stores with basic product recognition methods. It is the European equivalent of the US's UPC-A barcode. EAN stands for European Article Number, which is technically an International Article Number and is also used outside Europe.</td></tr>
<tr><td>ean8</td><td>EAN-8 barcodes are a shortened version of EAN-13 barcodes and are used as standard retail product identifiers in Europe and other countries. EAN stands for European Article Number, which has been renamed to International Article Number. However, "EAN" is still used today. EAN-8 (8 digits) is used for small packages, while EAN-13 codes (13 digits) are not.</td></tr>
<tr><td>upca</td><td>UPC-A barcodes are the most commonly used and most widely recognized type of barcode in the United States. Mainly used in retail and grocery stores. UPC-A was developed by the Uniform Grocery Product Code Council in collaboration with IBM and has been in use since 1974. The first UPC barcode scanned was Wrigley's Juicy Fruit gum. The package is on display at the Smithsonian.</td></tr>
<tr><td>upce</td><td>The UPC-E barcode is the Uniform Product Code and is the most widely used barcode in the United States. UPC-E is a shortened version of the standard-sized UPC-A numeric barcode used in retail stores across the country, including grocery stores. The shortened version is used for small products whose packaging is small and there is no space to place the full-sized UPC-A code.</td></tr>
<tr><td>rmcbc</td><td><font color=red> RM4SCC might be the correct abbreviation.</font>Royal Mail 4 State Customer Code (commonly known as RM4SCC) is a two-dimensional barcode developed by Royal Mail in the UK. A two-dimensional barcode developed by the Royal Mail Company in the United Kingdom and used to indicate the postal code of letters and parcels within the United Kingdom. This system is also used in other countries, but it is one of its variations. The printed code is optimized for fast reading.
</td></tr>
<tr><td>postnet</td><td>POSTNET stands for Postal Numeric Encoding Technique, and is used to sort mail to be delivered using the ZIP code (postal code) of the destination. You've probably seen it as printing on certain envelopes. This is a very different type of barcode than barcodes used in retail and other data storage applications. Although relatively short in height, they are generally longer in length than traditional models.</td></tr>
<tr><td>usps4cb</td><td>Intelligent Mail barcodes are also known as USPS OneCode solutions or USPS Four-State Customer Barcodes (4CBs, or USPS4CBs). Intelligent Mail barcode consists of 65 bars.
Intelligent Mail barcodes, or OneCode, combine both postal code and tracking information, benefiting both the mailer and the post office. Intelligent Mail Barcode or OneCode replaces POSTNET and PLANET barcodes.</td></tr>
<tr><td>pdf417</td><td>PDF417 is a two-dimensional code developed by Symbol Technology (USA/currently Motorola) in 1989. The name PDF417 comes from the initials of ① Portable Data File and ② the basic unit (codeword) consists of 17 modules of 4 bars and 4 spaces. doing. PDF417 is a stacked two-dimensional code that can be read even with low-cost laser scanners, the vertical and horizontal designs can be easily changed, and it has excellent error correction functions, so it has been highly evaluated and adopted from various fields. I did. In particular, it has been adopted as a standard symbol for EDI data in the international standard logistics label (ISO 15394/JIS X 0515).</td></tr>
<tr><td>datamatrix</td><td>DataMatrix is a matrix-type two-dimensional code developed by IDMatrix (USA) in 1987. In Japan, it is also called DataCode. DataMatrix has older versions ECC000-140 and a relatively new version ECC200. ECC000 to 140 have the disadvantage that there are few readers that handle distortion easily, so they are hardly used at present. On the other hand, ECC200 can store large amounts of data, has high reading performance, and is still widely used today. Therefore, unless otherwise specified regarding DataMatrix, this website describes ECC200.</td></tr>
</table>

This sample can be downloaded from the link below.

https://github.com/efwGrp/qittaSamples


# ※Reference
https://aimjal.co.jp/gijutu/2jigen/qrcode/qrcode.html

https://www.cognex.com/ja-jp/resources/symbologies/1-d-linear-barcodes

https://www.barcodesoft.com/ja/

https://ja.alegsaonline.com/art/83194