arielcamus said:
Hi devp,
I think it will be to late to answer your question. But it's maybe not to late for other people.
The problem is Java doesn't include javax.servlet into the API. So, you have to download the library and include it into your build PATH.
I'm currently using Maven, so I just have to run "Add dependency" or include a new dependency in my project pom file.
Anyway, after including the library javax.servlet, just upcast the object resulting of calling "reportContext.getHttpServletRequest();".
Do it this way:
HttpServletRequest request = (HttpServletRequest) reportContext.getHttpServletRequest();
After that, you can work with the HttpServletRequest object calling its getQueryString() or every other HttpServletRequest method.
i.e. String request = request.getQueryString());
I've spent few hours until I got the answer. I hope it will help you.
Hi arielcamus,
I am trying the same in MyEclipse BIRT Report. when I tried the following statement:
HttpServletRequest request = (HttpServletRequest) reportContext.getHttpServletRequest();
I got an error that "Missing ; before statement" after HttpServletRequest request
if i put
var request = (HttpServletRequest) reportContext.getHttpServletRequest();
I get the same error at a different place - after reportContext
only if I put
var request= reportContext.getHttpServletRequest();
there is no error but the value is null...
is there some other way out?
neeti