I have created a Filter to check the Cookies with request object and forward the request accordingly thanks to this and this question.
Filter
Cookie
forward
Just add these to your web.xml
myFilter com.examples.myFilter myFilter /index.html