Skip to main content



      Home
Home » Archived » BIRT » Can BIRT access the host name of the running TC Server?(Can BIRT Reports or Event Handlers access the host name of the running TC Server?)
Can BIRT access the host name of the running TC Server? [message #754275] Tue, 01 November 2011 14:09 Go to next message
Eclipse UserFriend
Is there a way to verify the host name, as a String, of the application server instance running the BIRT Report?

For example, I'd like to compare
http://${client_request_host}:8080/Birt/frameset?__report=report.rptdesign

to

http://${tomcat_server_host}:8080/

If ${client_request_host} and ${tomcat_server_host} are not equal, I want to display an invalid request error message.

Thank you,
Paula
Re: Can BIRT access the host name of the running TC Server? [message #755250 is a reply to message #754275] Mon, 07 November 2011 14:39 Go to previous messageGo to next message
Eclipse UserFriend
You can get the host running the report like:
reportContext.getHttpServletRequest().getServerName();

Not sure what you are comparing it to though.

Jason

On 11/1/2011 2:09 PM, paula.mcdowell wrote:
> Is there a way to verify the host name, as a String, of the application
> server instance running the BIRT Report?
>
> For example, I'd like to compare
> http://${client_request_host}:8080/Birt/frameset?__report=report.rptdesign
>
> to
>
> http://${tomcat_server_host}:8080/
>
> If ${client_request_host} and ${tomcat_server_host} are not equal, I
> want to display an invalid request error message.
>
> Thank you,
> Paula
Re: Can BIRT access the host name of the running TC Server? [message #755844 is a reply to message #755250] Wed, 09 November 2011 14:24 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for your response, Jason.

My report will be running in a web application. My end product will be a jar and a rptdesign to be included in the war.

So let me ask the question differently. Is there a way BIRT can access the server name of its parent web application?

For example:

http://www.example.com/BIRTReport/frameset?__report=myreport.rptdesign

The web application is BIRTReport. Is there a way to access "www.example.com" within my BIRT code? Either in the rptdesign or the event handlers? Ultimately I want to compare it to the "referer" cookie obtained from the client request.

Thanks.
Paula
Re: Can BIRT access the host name of the running TC Server? [message #755868 is a reply to message #755844] Wed, 09 November 2011 16:48 Go to previous message
Eclipse UserFriend
In this case:
reportContext.getHttpServletRequest().getServerName();
should work fine. Have yo tried it?

Jason

On 11/9/2011 2:24 PM, paula.mcdowell wrote:
> Thanks for your response, Jason.
>
> My report will be running in a web application. My end product will be a
> jar and a rptdesign to be included in the war.
> So let me ask the question differently. Is there a way BIRT can access
> the server name of its parent web application?
>
> For example:
> http://www.example.com/BIRTReport/frameset?__report=myreport.rptdesign
>
> The web application is BIRTReport. Is there a way to access
> "www.example.com" within my BIRT code? Either in the rptdesign or the
> event handlers? Ultimately I want to compare it to the "referer" cookie
> obtained from the client request.
>
> Thanks.
> Paula
Previous Topic:Manipulate elements manually over script
Next Topic:wget report
Goto Forum:
  


Current Time: Tue Jul 22 17:48:58 EDT 2025

Powered by FUDForum. Page generated in 0.04853 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top