Reportes con imagenes en Java Server Faces Deseamos mostrar en el reporte la imagen escudonacional.gif, que estĆ” almacenada en /resources/imagenes En el controller que usamos para imprimir crear el metodo public static String getPath() { try { ServletContext ctx = (ServletContext) FacesContext.getCurrentInstance() .getExternalContext().getContext(); return ctx.getRealPath("/"); } catch (Exception e) { JSFUtil.addErrorMessage("getPath() " + e.getLocalizedMessage()); } return null; } En el mĆ©todo imprimir, generar el path mediante el llamado a getPath(), y colocar la ubicaciĆ³n de la imagen. private String imprimirGeneralIngresos(List<InformeGeneralIngresos> list, Double totalenviado, Double totalcomision, Double totalitbm, Double total) { try { String ruta = "/resources/reportes/info
Un blog desde Panama sobre NetBeans, Java, JSF, jmoordb,Microprofile, JakartaEE