method getHttpServletRequest() returns null [message #173680] |
Tue, 27 June 2006 04:58 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03182 seconds