Holger's
Java API

com.antelmann.servlet.barcode
Class BarcodeImageServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.antelmann.servlet.barcode.BarcodeImageServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

@ThirdParty(value="uses net.sourceforge.barbecue")
public final class BarcodeImageServlet
extends javax.servlet.http.HttpServlet

generates a single barcode image based on input parameters.

Author:
Holger Antelmann
See Also:
Serialized Form

Field Summary
static String DEFAULT_TYPE
           
 
Constructor Summary
BarcodeImageServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          generates the image based on the parameters code, type, showLabel
protected  void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
static String generateQuery(javax.servlet.ServletRequest request)
          generates the string that is to follow the ?
static String generateQuery(String code, String type, boolean showLabel, String charset)
          generates the string that is to follow the ?
static String[] getBarcodeTypes()
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TYPE

public static String DEFAULT_TYPE
Constructor Detail

BarcodeImageServlet

public BarcodeImageServlet()
Method Detail

getBarcodeTypes

public static String[] getBarcodeTypes()

generateQuery

public static String generateQuery(String code,
                                   String type,
                                   boolean showLabel,
                                   String charset)
generates the string that is to follow the ? in a URL to produce the desired barcode. The encoding is based on UTF8.

Parameters:
type - may be null, defaults to DEFAULT_TYPE

generateQuery

public static String generateQuery(javax.servlet.ServletRequest request)
generates the string that is to follow the ? in a URL to produce the desired barcode. The encoding is based on the request.


doPost

protected void doPost(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws IOException,
                      javax.servlet.ServletException
Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
IOException
javax.servlet.ServletException

doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws IOException,
                     javax.servlet.ServletException
generates the image based on the parameters code, type, showLabel

Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
IOException
javax.servlet.ServletException


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads