Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 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
paula.mcdowell is currently offline paula.mcdowell
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 14:39 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
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


Jason Weathersby

BIRT Exchange
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
paula.mcdowell is currently offline paula.mcdowell
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 16:48 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
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


Jason Weathersby

BIRT Exchange
Previous Topic:Manipulate elements manually over script
Next Topic:wget report
Goto Forum:
  


Current Time: Fri Apr 18 01:34:59 EDT 2014

Powered by FUDForum. Page generated in 0.18657 seconds