Where is this class "HttpContext" exist in glassfish jersey 2.9 . I was using jersey 1.17.1 to use HttpContext where it was exist in package com.sun.jersey.api.core.HttpContext.
But i did't find it in jersey 2.9.
The direct replacement for HttpContext is not available in Jersey 2.x versions and unfortunately, this breaking change detail hasn't been mentioned anywhere in the migration guide. Instead of searching for direct replacement, if we dig deeper into the interface HttpContext, based on the following method summary
refer
we can infer that instead of using HttpContext, we can simply use the following out-of-the-box alternatives.
HttpContext#getRequest use @Context ContainerRequestContext crcHttpContext#getResponse use @Context ContainerResponseContext crcHttpContext#getUriInfo use @Context UriInfo uriInfoHttpContext#getProperties use ContainerRequestContext#getPropertyIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With