Skip to Content
0
Former Member
Jul 03, 2017 at 02:31 PM

Retrieve HTTP status code of response while processing portal component

141 Views

Hello,

I need to retrieve the HTTP status code of a response in an AbstractPortalComponent.

So far I have identified, that the doContent() method offers with the response parameter object (IPortalComponentResponse) a method named response.getStatus(). However this always returns the value 0.

Example:

public void doContent(IPortalComponentRequest request, IPortalComponentResponse response) {
    int statusCode = response.getStatus(); //Always returns 0
}

I would have expected for example something like 200 (for status OK) or 302 (for status moved permanently).

So far I haven’t found any way to retrieve this HTTP status code. Does anyone have a clue or idea?

Best regards

Mario