I'm not sure that you're creating the cookie or client side (js/jquery) or server side (java).
Based on that design approach, you could simply redirect the request in either js using window.location(path) or response.sendRedirect(path), response.setStatus(301) and response.setHeader("Location",path)
you should check for the cookie existence and do the redirect in client side to avoid access to content in case it is cached in dispatcher.
you may have to do the same in both places based on the flow of request and number of entry points for your use case.
HTH