Skip to main content



      Home
Home » Archived » BIRT » method getHttpServletRequest() returns null
method getHttpServletRequest() returns null [message #173680] Tue, 27 June 2006 04:58
Eclipse UserFriend
Originally posted by: rrussi.gmail.com

Hi... I'm new to this newsgroup... Hallo all!

I use the following code in my report:
servletRequest = reportContext.getHttpServletRequest();
userSession = servletRequest.getSession().getAttribute("userSession");
reportUser = userSession.getOperatorID();
reportContext.setPersistentGlobalVariable("opID", reportUser);

It works, in my global variable "opID" i find the value "admin" or
"guest"... The user account of the operator accessing the report...
But at the end of my frameset view i find this:

The following items have errors:
report report:
+ There are errors evaluating script "servletRequest =
reportContext.getHttpServletRequest();
userSession = servletRequest.getSession().getAttribute("userSession");
reportUser = userSession.getOperatorID();
reportContext.setPersistentGlobalVariable("opID", reportUser);".

And I find this exception in the logs:

org.eclipse.birt.report.engine.executor.ExecutionContext evaluate
SEVERE: TypeError: Cannot call method "getSession" of null (<inline>#1)
org.mozilla.javascript.EcmaError: TypeError: Cannot call method
"getSession" of null (<inline>#1)
at
org.mozilla.javascript.ScriptRuntime.constructError(ScriptRu ntime.java:3240)
.............

I'm running the report viewer under JBoss...

Any suggestion?

Thanks in advance,
Raffaele
Previous Topic:Parameter as variable in JDBC data source
Next Topic:setparameter Integer
Goto Forum:
  


Current Time: Sat May 10 04:42:37 EDT 2025

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

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

Back to the top