This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
You need to use JSP comments, i.e., <%-- --%> instead of HTML comments.
Edit: Of course, you already realized that. The reason for this is that JSP translator does not recognize HTML comments; it's just text that it sees needs to be included in the response. Regarding your question about "pre-processing", the answer would be yes because a JSP is translated into a Servlet.