QR code filter ver. 1.2


This is a Java servlet filter (as per Servlet API 2.3). This filter lets produce QR code for any URL in your web application. Just add .qr suffix for any URL and get QR code for it.

How to use it:

a) download qrcodeflt.jar and save it in WEB-INF/lib

b) describe this filter in web.xml. You can add also the following initial parameters:

width - describes a width for QR code. Default value is 300
height - describes a height for QR code. Default value is 300
transcoder - if this value is true then wireless transcoder will be added to your URL. Default value is false
short - if this value is true then filter will create a short URL. It helps you to produce more compact QR code. Default value is false

E.g.:
 


<filter>
  <filter-name>QRCodeFilter</filter-name>
  <filter-class>com.cj.qr.QRCodeFilter</filter-class>
  <init-param>
   <param-name>short</param-name>
   <param-value>true</param-value>
  </init-param>
</filter>

c) describe a mapping for this filter in web.xml. E.g.:
 


<filter-mapping>
  <filter-name>QRCodeFilter</filter-name>
  <url-pattern>*.qr</url-pattern>
</filter-mapping>

in this case filter will be on for each URL that ends with .qr

For example, http://your_host/your_page.jsp - is a real page, http://your_host/your_page.jsp.qr - its QR code etc.

   For downloading:
    Filter:  qrcodeflt.jar

 ©  Coldbeans     Comments?

See also JSOS - the largest collection of servlets and filters.

Also in JSOS: