Jasper Report : Document root element “jasperReport”, must match DOCTYPE root “null”

后端 未结 2 631
清酒与你
清酒与你 2020-12-07 05:24

I have designed jasper report using iReport version (4.7.1). Through iReport it works fine. When I called from java servlet, I get an error:

Err         


        
2条回答
  •  广开言路
    2020-12-07 05:51

    Assuming that the jrxml file has been added to your jar file, you should load it like this:

    InputStream is = ReportServlet.class.getResourceAsStream(themeDesignName);
    jasperDesign = JRXmlLoader.load(is);
    

提交回复
热议问题