1、生成条码的servlet代码:
import java.io.IOException; import javax.servlet.ServletException;import javax.servlet.ServletOutputStream;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse; import com.google.zxing.BarcodeFormat;import com.google.zxing.WriterException;import com.google.zxing.client.j2se.MatrixToImageWriter;import com.google.zxing.common.BitMatrix;import com.google.zxing.oned.Code128Writer; /** * @Description: 生成条码(CODE128格式) */public class BarCode1DServlet extends HttpServlet { /** * @Fields serialVersionUID : default serialVersionUID */ private static final long serialVersionUID = 1L; private static final String KEY = "keycode"; private static final String WIDTH = "mwidth"; private static final String HEIGHT = "mheight"; private