Firstly, why are you using out.print to emit HTML code? That's why we use JSP in the first place... so that we can just use template text for HTML.
Secondly, you are not generating valid HTML. Do a View Source in the browser and look at the HTML that is being sent to the browser. You'll see that it's a mess.
It's not clear that there's anything wrong with your JSP at all... except for the fact that you are putting Java code in a JSP -- a practice that has been frowned upon for over 8 years now.
If your JSP is not creating valid HTML, the display will not be correct. Making sure that valid HTML is being generated is the first step to even determining if there are any other problems.
Cookie c is never assigned a value. And ++ on what Bear said. Why is java+jsp code together like that ? Separate your view components and place them in your JSP