Pessoal, boa noite,
eu tenho um servlet onde imprimo um recibo diretamente na impressora fiscal, porem apos imprimir, a tela fica branca, eu gostaria de redirecionar para outra pagina para continuar a impressão dos recibos como eu faria?
segue o codigo
try {
String imprEtiq = "cupom";
ServletContext context = getServletContext();
JasperReport relat = (JasperReport)JRLoader.loadObject(
context.getRealPath("/WEB-INF/reports/recibomensalidadesfiscal.jasper"));
// parâmetros, se houverem
Map<String, String> parametros = new HashMap<String, String>();
String matricula = request.getParameter("matricula");
parametros.put("matricula", matricula);
// direciona a saída do relatório para um stream
JasperPrint jasperPrint = JasperFillManager.fillReport(relat,parametros,conn);
ByteArrayOutputStream arrayOutputStream = new ByteArrayOutputStream();
JasperExportManager.exportReportToPdfStream(jasperPrint, arrayOutputStream);
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
//pras.add(new Copies(1));
PrintServiceAttributeSet psas = new HashPrintServiceAttributeSet();
psas.add(new PrinterName(imprEtiq, null));
JRPrintServiceExporter exp = new JRPrintServiceExporter();
exp.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exp.setParameter(JRPrintServiceExporterParameter.PRINT_REQUEST_ATTRIBUTE_SET, pras);
exp.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE_ATTRIBUTE_SET, psas);
exp.setParameter(JRPrintServiceExporterParameter.DISPLAY_PAGE_DIALOG, Boolean.FALSE);
exp.setParameter(JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG, Boolean.FALSE);
exp.exportReport();
obrigado a todos