|
Re: How access to servlet context parameters from birt javascript? [message #780881 is a reply to message #780873] |
Thu, 19 January 2012 19:07 |
|
Try:
req =reportContext.getHttpServletRequest();
sc = req.getSession().getServletContext();
//xyz = sc.getRealPath("/");
var workingpath =sc.getInitParameter("BIRT_VIEWER_WORKING_FOLDER");
This will not work in the designer but should work in the deployed
viewer. You could also use getRealPath which should work in both.
Jason
On 1/19/2012 1:46 PM, Angel Cervera Claudio wrote:
> I have a report with a dynamic xml file as datasource.
> This file is generated previously to launch the report and is send like
> a report parameter.
>
> So I declared a datasource with target in "property binding":
>
> "/path_to_folder_with_generated_files/data/" +
> params["dynamic_xml_file"].value
>
> At this point, go all right.
>
> But i need that "/path_to_folder_with_generated_files/data/" will be
>
> {BIRT_VIEWER_WORKING_FOLDER} + "/data/" + params["dynamic_xml_file"].value
>
> where {BIRT_VIEWER_WORKING_FOLDER} will be the value of this context
> parameter declared in web.xml deploy descriptor.
>
> How do i access to context parameters from birt javascript?
>
>
>
> Environment: Birt 3.7.1 deployed in Glassfish 3.1, ubuntu linux, jdk 1.6
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03818 seconds