Olá pessoal, td blzz.
Qdo chamo o JSP, o tomcat me retorna um erro q está logo abaixo:
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 37 in the jsp file: /jsp/html.jsp
Generated servlet error:
[javac] Compiling 1 source file
C:\Arquivos de programas\Apache Group\Tomcat 4.1\work\Standalone\localhost\web_consultas\jsp\html_jsp.java:65: cannot resolve symbol
symbol : method fillReport (net.sf.jasperreports.engine.JasperReport,java.util.Map,datasource.WebappDataSource)
location: class net.sf.jasperreports.engine.JasperFillManager
JasperFillManager.fillReport(
^
1 error
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:248)
O código JSP q estou usando é este:
<%@ page errorPage="error.jsp" %>
<%@ page import="datasource.*" %>
<%@ page import="net.sf.jasperreports.engine.*" %>
<%@ page import="net.sf.jasperreports.engine.util.*" %>
<%@ page import="net.sf.jasperreports.engine.export.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%
File reportFile = new File(application.getRealPath("/reports/usuarios.jasper"));
JasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile.getPath());
Map parameters = new HashMap();
parameters.put("ReportTitle", "Address Report");
parameters.put("BaseDir", reportFile.getParentFile());
JasperPrint jasperPrint =
JasperFillManager.fillReport(jasperReport,parameters,new WebappDataSource());
JRHtmlExporter exporter = new JRHtmlExporter();
StringBuffer sbuffer = new StringBuffer();
Map imagesMap = new HashMap();
session.setAttribute("IMAGES_MAP", imagesMap);
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, out);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "image.jsp?image=");
exporter.exportReport();
%>