[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[birt-report-engine-dev] BIRTReport Engine in a Portlet
|
- From: "Kai Hemmer" <kh@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 1 Dec 2006 13:56:07 +0100
- Delivered-to: birt-report-engine-dev@eclipse.org
- Thread-index: AccVSBFeR5seeG3bReiMejAOMcGpDw==
I'm trying to use the BIRTReportEngine API in a portlet.
I have been trying to do this by modifying the servlet example on the web
site: http://wiki.eclipse.org/index.php/Servlet_Example
My problem now is to get a ServletContext from the portlet in order to
create and get an IReportEngine-object.
I know there was an article from Deepa Remesh (Tue, 24 Oct 2006) with the
following subject "Deploying BIRT Report Engine in a portlet ?". Deepa
resolved the problem by casting the portletContext into PortletContextImpl
and called the method getServletContext().
ServletContext sc =
((PortletContextImpl)req.getPortletSession().getPortletContext()).getServlet
Context();
But I get a classCastException by doing this!
Does anyone have an idea what to do?
Or is there any other way to create an IReportEngine in a portlet?
I would appreciate any help.
Thanks,
P.