Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Use local tomcat server to preview reports
1shot
<p>When previewing a report in BIRT, is it possible to redirect the report to a local Tomcat Server for it to be rednered there? (As opposed to having the report rendered by the Eclipse viewer plugin). </p>
<p> </p>
<p>In window>preferences>preview>preview server, you can configure what appears to be the viewer plugin (see attached image), but I do not see a way to have the report redirected to a local Tomcat Server for rendering. </p>
<p> </p>
<p>
Find more posts tagged with
Comments
kclark
<p>You should be able to do this, I've done it in the past. The trick is that the designer expects your Sample Viewer in tomcat to have the context of /viewer</p>
<p> </p>
<p>Assuming you change your Sample Viewer so you can hit it at the following URL</p>
<pre class="_prettyXprint">
http://localhost:8080/viewer</pre>
<p>Then you should be able to enter localhost and 8080 into these preferences and have it working. Let me know if it works for you.</p>
1shot
<p>Hi Kristopher,</p>
<p> </p>
<p>Thanks for the tip.</p>
<p> </p>
<p>I dug around in the <strong>org.eclipse.birt.report.viewer</strong> folder and hunted for a context parameter where I could change a context value, "/viewer", to be the name of my Tomcat BIRT viewer webapp. I couldn't locate it, unfortunately. </p>
<p> </p>
<p>In that directory, I checked the <strong>birt\web-inf\viewer.properties</strong> file and the <strong>birt\web-inf\web.xml</strong> file.</p>
<p> </p>
<p>Do you know where the context "\viewer" attribute might be stored? Thank you.</p>
kclark
<p>I usually just rename the WAR file to whatever I want the context to be then redeploy to tomcat, I've never had any problems with that.</p>
kclark
<p>There's one other "gotcha" to this that I forgot about. You'll either need to change the report repository in web.xml to point at your workspace so the viewer knows where your reports are, or make your workspace the root of your webapp. Otherwise, you'll need to copy your report to the viewer folder each time you want to view a report.</p>
1shot
<p>Thanks. What if a .war file wasn't used? I followed the directions <a data-ipb='nomediaparse' href='
http://www.eclipse.org/birt/documentation/integrating/viewer-setup.php'>here
</a>in order to set up the viewer on Tomcat, which just has you copy out the WebViewerExample directory to the webapps folder in Tomcat. I could just rename the webapp to "viewer", but then I would cause another issue (due to the below). </p>
<p> </p>
<p>The other challenge is I intend to set up my other 3 BIRT versions to point at different builds of the BIRT viewer on Tomcat, so I need to set the re-direct in Eclipse to a specific web app on Tomcat. </p>
<p> </p>
<p>Good point about the web.xml config. When I did rename my webapp to viewer, it failed, and I realized it was probably due to the fact that it couldn't find my libraries, etc.</p>