|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
net.sourceforge.barbecue.BarcodeServlet
public class BarcodeServlet
The query parameters for this servlet are:
Example URL: http://hostname:80/myapp/BarcodeServlet?data=12345&type=Code128A
Contributed by Robert Chou <rchou at users.sourceforge.net>
Constructor Summary | |
---|---|
BarcodeServlet()
|
Method Summary | |
---|---|
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
From HttpServlet. |
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
From HttpServlet. |
protected Barcode |
getBarcode(String type,
String data,
String appId,
boolean checkSum)
Returns the appropriate barcode for the speficied parameters. |
String |
getServletName()
From HttpServlet. |
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, init, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BarcodeServlet()
Method Detail |
---|
public String getServletName()
getServletName
in interface javax.servlet.ServletConfig
getServletName
in class javax.servlet.GenericServlet
public void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException
doPost
in class javax.servlet.http.HttpServlet
req
- The servlet requestres
- The servlet response
javax.servlet.ServletException
- If an error occurs during processingpublic void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException
doGet
in class javax.servlet.http.HttpServlet
req
- The servlet requestres
- The servlet response
javax.servlet.ServletException
- If an error occurs during processingprotected Barcode getBarcode(String type, String data, String appId, boolean checkSum) throws javax.servlet.ServletException
type
- The barcode typedata
- The data to encodeappId
- The (optional) application ID - for UCC128 codescheckSum
- Flag indicating whether a checksum should be appended to the barcode - for Code 39 barcodes
javax.servlet.ServletException
- If required data is missing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |