public void doGet(HttpServletRequest request, HttpServletResponse resp) throws ServletException, IOException {
try{
Connection con=ConnectionManager.getConnection();

String root_path="D:/study tools/admin.jrxml";

JasperReport report = (JasperReport) JRLoader.loadObject(root_path);

JasperPrint jasperPrint = JasperFillManager.fillReport(report, new HashMap(),con);

resp.setContentType("application/pdf");
resp.setCharacterEncoding("UTF-8");
resp.setHeader("Content-Disposition", "attachment; filename=\"" +   URLEncoder.encode("PDF报表", "UTF-8")+ ".pdf\"");

JRPdfExporter exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
//exporter.setParameters(parameters);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, resp.getOutputStream());
exporter.exportReport();
}catch(Exception e){
e.printStackTrace();
}
}
我是通过一个页面提交到这个Servlet中,想显示报表,帮忙看一下有什么错误,运行时报错