Jasper Viewer not working after export to WAR file


Jasper Report Viewer working from IDE (Eclipse), but when deployed WAR to tomcat server and run web applications from tomcat, report viewer doesn't come up. Even I can't see any error in log or on screen. Please help

My code is below. 

            HashMap hm = new HashMap();
            String reportUrl = "/reports/contact2.jasper"; 
            InputStream jasperStream = getClass().getResource(reportUrl).openStream() ;
            JasperPrint jprint = JasperFillManager.fillReport(jasperStream, hm, new JREmptyDataSource(1));
            JasperViewer.viewReport(jprint, false);

awadhesh4772's picture
Joined: Mar 2 2017 - 11:02am
Last seen: 1 year 6 months ago

FYI, versions are
java - 1.8
tomcat 8

awadhesh4772 - 5 years 3 months ago

0 Answers:

No answers yet