Spring MVC + Tiles: <!-- comments --> not rendering

I am using Spring MVC 3.1.x with Tiles 2.2.2 (bootstrapped project with Roo) and trying to create a view with a tiles template like:

<html   xmlns:jsp="http://java.sun.com/JSP/Page" 
    xmlns:util="urn:jsptagdir:/WEB-INF/tags/util" >

<jsp:output doctype-root-element="HTML" doctype-system="about:legacy-compat" />
<jsp:directive.page contentType="text/html;charset=UTF-8" />
<jsp:directive.page pageEncoding="UTF-8" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=8" />    

    <util:load-scripts />

    <spring:message code="application_name" var="app_name" htmlEscape="false"/>
    <title><spring:message code="welcome_h3" arguments="${app_name}" /></title>
    <!--Comments -->
    <!--[if IE]>
    <tiles:insertAttribute name="menu" ignore="true" />

The Tiles attributes are working well, but neither the comments nor the conditional CSS are rendering; they just are not present in the output code.

Any ideas to render this "html comment element" code?


Solution: Jspx files and conditional comments

In summary, comments in jsp documents are ignored. The solution is:

<jsp:text><![CDATA[<!--[if lte IE 9]>]]></jsp:text>

Try to use jsp comments <%-- comment --%>. Hope this helps you. Cheers.

Need Your Help

MySQL - Decimal cannot be NULL

php mysql

Everytime I try to make an insert statement into my dastabase I get a "Incorrect decimal value: 'NULL' for column 'bounty3' at row 1" error. How do I insert a null value into a decimal datatype? ...

Debugging instance of another thread altering my data

c++ c visual-studio-2008 multithreading debugging

I have a huge global array of structures. Some regions of the array are tied to individual threads and those threads can modify their regions of the array without having to use critical sections. But