日期:2014-05-17 浏览次数:20721 次
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); out.print( " <script> alert( 'Booking successfully ') </script> "); ByteArrayOutputStream out1 = QRCode.from(all).to(ImageType.PNG).stream(); response.setContentType("image/png"); response.setContentLength(out1.size()); OutputStream outStream = response.getOutputStream(); outStream.write(out1.toByteArray()); outStream.flush(); outStream.close();