I'm working on system which will allow users to create workspaces.After workspace creation user may login by providing username, password and workspace. And i need jsessionid generated after login to create connection between workspace and jsessionid.
Login goes thru REST.
@POST
@Path("login")
@Produces(ContentType.APPLICATION_JSON_CHARSET_UTF_8)
public JsonObject login(LoginCredentials loginCredentials) throws UnAuthorizedException {
//login logic
}
I also have interceptor implementing ContainerResponseFilter, WriterInterceptor.
@Override
public void filter(ContainerRequestContext requestContext, ContainerResponseContext context)throws IOException {
//...
}
how can i get generated jsessionid (which i see in response header)?