|
This servlet lets you produce QR codes for links. Internally servlet uses Google Charts API and caches data for the better performance. How to use this servlet: a) download qrcodePackage.jar and save it in WEB-INF/lib b) describe this servlet in web.xml file. Servlet accepts the following initial parameters:
For example:
<servlet> <servlet-name>QRCodeServlet</servlet-name> <servlet-class>com.jsos.qr.QRCodeServlet</servlet-class> <init-param> <param-name>dir</param-name> <param-value>/my_cache</param-value> </init-param> </servlet> c) describe a mapping for this servlet in web.xml file. E.g.:
<servlet-mapping> <servlet-name>QRCodeServlet</servlet-name> <url-pattern>/servlet/qrcode</url-pattern> </servlet-mapping> and now in your applications you can use servlet in the following forms
/servlet/qrcode?your_url e.g. /servlet/qrcode?http://www.servletsuite.com and you will get the following image:
You can describe the proxy settings for the servlet itself.
Parameters are proxyHost and proxyPort. E.g.:
<servlet> <servlet-name>QRCodeServlet</servlet-name> <servlet-class>com.jsos.qr.QRCodeServlet</servlet-class> <init-param> <param-name>dir</param-name> <param-value>/my_cache</param-value> </init-param> <init-param> <param-name>proxyHost</param-name> <param-value>192.168.0.1</param-value> </init-param> <init-param> <param-name>proxyPort</param-name> <param-value>8080</param-value> </init-param> </servlet> For downloading: QR code servlet: qrcodePackage.jar
See also JSOS - the largest collection of servlets and filters.
|
Also in JSOS:
|