Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Could not get "birt.viewer.resource.path" in AppContext
elvis_tu
Hi all,
I had set <context-param> in web.xml
<context-param>
<param-name>BIRT_RESOURCE_PATH</param-name>
<param-value>/report/resources</param-value>
</context-param>
and try to print out the param in property binding in the data source:
importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "D:/temp/birt.log", true ) );
out.println("appcontext-->" + reportContext.getAppContext().keySet() );
out.println("BIRT_RESOURCE_PATH-->"+ reportContext.getHttpServletRequest().getSession().getServletContext().getInitParameter("BIRT_RESOURCE_PATH"));
out.println(profile);
out.close();
the log file showed as:
appcontext-->[PARENT_CLASSLOADER, webapplication.projectclasspath, BIRT_VIEWER_HTTPSERVET_REQUEST]
BIRT_RESOURCE_PATH-->/report/resources/
there is no "birt.viewer.resource.path" or "BIRT_RESOURCE_PATH" in appcontext, why not?
how could I get "birt.viewer.resource.path" in appcontext?
Thanks a lot.
Find more posts tagged with
Comments
JasonW
Use this expression:
aaa = reportContext.getAppContext().get("birt.viewer.resource.path");
Atul Arora
<p>How we can find the file name or path of data design from script</p>
JFreeman
<p>Are you trying to get the location of the data design that is a data source for the report?</p>
<p>Is the data design stored on the iHub and want to get the path of its relative location on the iHub?</p>
<p> </p>
<p>This thread is in regards to using the open source viewer which means it is not going to be the same as getting file list from an iHub installation which i'm guessing is your setup since you are using data objects.</p>