Adding an object to the application context! (Book example: Integrating and Extending) [message #991469] |
Wed, 19 December 2012 06:20  |
Eclipse User |
|
|
|
Hi all,
I'm new at BIRT and trying to work into it. I'm using the book "Integrating and Extending BIRT".
In the initial situation is that I have a jsp file like this:
<%
java.lang.String teststr = "MyTest";
session.setAttribute("AppContextKey", teststr);
java.lang.String stringObj = "This test my Application Context From the Viewer";
session.setAttribute("AppContextValue", stringObj);
String redirectURL = "LINK TO URL";
response.sendRedirect(redirectURL);
%>
I also have a report file which is named AppContext.rptdesign.
Aferwards I'm trying to display the string in a data item.
The expression of the data item is:
try{
MyTest.toString();
}catch(e){
"My Object Was not Found";
}
If I start run the Application I don't get the String! It can't find the Object.
In the book is and additional code snippet like this:
config = new EngineConfig();
HashMap hm = config.getAppContext();
hm.put("MyTest", stringObj);
config.setAppContext(hm);
Unfortunately I dont't know where to add this and there is not a description about it.
Cheers,
Samet
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07215 seconds