2

I am newbie in BIRT reporting. I am trying to integrate BIRT runtime as per solution given in this post here but it did not work. I also tried to find BirtEngineServlet from org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar file but I could not find this class.

Can anybody please help me out?

2 hours later:

Ok so BirtEngineServlet is in viewservlets.jar file, it resides in:

birt-runtime-3_7_1\WebViewerExample\WEB-INF\lib.

Because BirtEngineServlet is found in viewServlets.jar and this jar is located under path I mentioned, I tried to copy all jars from above path into my application WEB-INF/lib folder and tried to access the test report by using URL suggested in linked post .The URL I used is: localhost:8080/myOwnWebapp/…. Now I am getting following exception:

File "/webcontent/birt/pages/layout/RequesterFragment.jsp" not found at
org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:412) at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)

my web.xml has following code.

 <servlet>
        <servlet-name>EngineServlet</servlet-name>
        <servlet-class>org.eclipse.birt.report.servlet.BirtEngineServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>EngineServlet</servlet-name>
        <url-pattern>/output</url-pattern>
    </servlet-mapping>
Community
  • 1
  • 1
pdhinoja
  • 95
  • 3
  • 10
  • ok so BirtEngineServlet is in viewservlets.jar file, resides in birt-runtime-3_7_1\WebViewerExample\WEB-INF\lib. – pdhinoja Mar 29 '12 at 13:11
  • as BirtEngineServlet is found in viewServlets.jar and this jar is located under path I mentioned, I tried to copy all jars from above path into my application WEB-INF/lib folder and tried to access the test report by using URL suggested in linked post .The URL I used is : http://localhost:8080/myOwnWebapp/output?__report=test.rptdesign&__format=html. now I am getting following exception. – pdhinoja Mar 29 '12 at 13:15
  • File "/webcontent/birt/pages/layout/RequesterFragment.jsp" not found at org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:412) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379) – pdhinoja Mar 29 '12 at 13:23
  • Hey, that's my post. It worked fine for me. What does your `web-inf.xml` look like? You should edit your question to add the relevant code from your `web-inf.xml` for this webapp, don't post it in a comment. I took the liberty of adding your other comments into your question because they're related, they should show up there soon, and then you can delete the comments above this. – egerardus Mar 29 '12 at 21:57
  • thanks Geronimo for your feedback. you are asking about web.xml right? Also As I mentioned earlier that all BIRT runtime jars should be copy from birt-runtime-3_7_1\WebViewerExample\WEB-INF\lib and not from \birt-runtime-3_7_1\ReportEngine\lib location as later dont contain viewServlets.jar. – pdhinoja Mar 30 '12 at 06:18
  • Yeah sorry, meant web-inf/web.xml. What you have looks fine. Was this resolved using the viewer library jars? Or do you still get the exception? I can't remember if I set mine up with the viewer library but I should specify it in that other post if it worked okay. – egerardus Mar 30 '12 at 16:07
  • @Geronimo, no it is not working yet and as I said, I am getting above exceptions of RequestFrangment.jsp not found when I try to access test report. can you please let me know what I am missing here? FYI, after using viewer library, at least BIRT engine is started(i.e BirtEngineServlet is loaded successfully). – pdhinoja Apr 02 '12 at 07:05

1 Answers1

1

As per today you can easily integrate BIRT like any other API as maven dependency into existing Java EE applications.

<dependency>
    <groupId>org.eclipse.birt.runtime</groupId>
    <artifactId>org.eclipse.birt.runtime</artifactId>
    <version>4.4.1</version>
</dependency>

Follow the Integrating Birt tutorial for coding details.

David
  • 3,388
  • 2
  • 21
  • 25