I currently run birt-viewer under Tomcat 6.
I access my reports by putting them in the birt-viewer directory under webapps. I then use a jsp with content as follows to access the reports because I want them to show in a frame in my web page:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<html>
<head>
<script language="JavaScript" >
function showBIRTReport() {
window.location="
http://localhost:8080/birt-viewer/frameset?__report=myReport.rptdesign";
}
</script>
</head>
<body onload="showBIRTReport()">
</body>
</html>
This works great but now I have come across a situation where I need to pass a parameter from my jsp page to the BIRT viewer so that I can use it in the where clause of a query to limit what the query returns.
How do I do this? I have looked at the section in the book which talks about using AppContextKey and AppContextValue but I am not an experienced web developer so I am not sure how to apply the Listing 5-12 advice to my situation. I understand that the code between <% and %> is Java that runs in a .jsp.
Can I use something like <jsp:forward page="<%=
http://localhost:8080/birt-viewer/frameset?__report=myReport.rptdesign" %>" /> to get birt-viewer running my report?
More importantly, can I put the setAttribute calls in the Java code that forwards to my .jsp above and avoid doing the setting in the .jsp itself?
Thanks for any help you can provide.