Question

I'm using ServletRequestListener to attach to new requests, get a ServletRequest object and extract cookies from it.

I've noticed that only HTTPServletRequest has cookies but I haven't found a connection between those two objects.

Is it okay to use

HttpServletRequest request = ((HttpServletRequest) FacesContext.getCurrentInstance()
                .getExternalContext().getRequest());

to retrieve the request while in a RequestInitialized method? (I do want to run on every request)

FYI - This is all done in a JSF 1.2 Application

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top