I have an apache ISIS webapplication with several Objects and RestfulServices. For logging-purposes i need some information of the request itself, not only the parameters which should be send. How can I access these Request-Header information?
I tried to get the HttpServletRequest
via the RequestCycle
object. Here is the code-line:
HttpServletRequest req = (HttpServletRequest) RequestCycle.get().getRequest().getContainerRequest();
When I create the objects via apache wicket viewer I get access to the HttpServlerRequest
object and all the information of the request. But when I send the a request via the restful services I get a NullpointerException
when I try to access the RequestCycle
.
Do you have any idea how to access the request header in this domainservice?
Thanks for your help.