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

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top