Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 18:09 Go to next message
paula.mcdowell is currently offline paula.mcdowellFriend
Messages: 16
Registered: June 2011
Junior Member
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 19:39 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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 19:24 Go to previous messageGo to next message
paula.mcdowell is currently offline paula.mcdowellFriend
Messages: 16
Registered: June 2011
Junior Member
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 21:48 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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: Fri Apr 19 09:21:52 GMT 2024

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

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

Back to the top