BIRT Exchange Forum: Update URL in beforeFactory() - BIRT Exchange Forum

Jump to content


 

BIRT Poll: To best make a table fill a pdf page before breaking (PL=page layout, PBI=page break interval) set:

PL: auto, PBI: 0PL: fixed, PBI: 0PL: auto, PBI: 1000000PL: fixed, PBI: 1000000
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Update URL in beforeFactory() Rate Topic: -----

#1 User is offline   Johny Key Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 29-August 11


Posted 28 November 2011 - 02:25 AM

I am tryin' to cope with problem of covering report parameters in URL using ciphers. The reason for this is clear - I don't want the user to see what parameters are passed to the report's URL.

Example
Original URL: http://localhost:808...e=dev&year=2009
Crypted URL: http://localhost:808...Idnfksdlfnskdlf

So the part after name of the report, that has to be generated

__format=xls&profile=dev&year=2009

is being encrypted to this

dcdSfCirelfcdDKFMFNIdnfksdlfnskdlf

and parameter "p" is added that holds encrypted text.

Now I want to decrypt parameters held by "p" parameter in the beforeFactory() method. I created eventHandler that extends ReportEventAdapter and overrides beforeFactory() method for this purpose but I don't know how to access "p" parameter.

Can anyone provide me please mechanism for accessing URL text?

I really appreciate any help.

Thanks
0

#2 User is offline   Johny Key Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 29-August 11


Posted 29 November 2011 - 12:21 AM

I solved the problem using little work-around: I added parameter "p" to all my reports, so in beforeFactory() the parameter had been set and then I can access it and decrypt.

But now I face another big problem. Is there any way to set the "__format" parameter programmatically? For now I do not encrypt this parameter but that's not the best solution.
0

#3 User is offline   JasonW Icon

  • Senior Member
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 2505
  • Joined: 08-August 07


Posted 29 November 2011 - 03:12 PM

You could try:
reportContext.getRenderOption().getOptions().set("Format","html"); I am not certain this will work. May be to late.

You can access the url like:
reportContext.getHttpServletRequest().getParameter("__format");

Jason
0

#4 User is offline   midani Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 21-March 12


Posted 01 August 2012 - 05:44 AM

Hello could you please provide the BeforeFactory scripting that was done and any javascript files?

thanks,
Michele
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users