this <div id="adiv"></div> will in JSPX somehow be translated into <div id="adiv" />. The way I got it to work is to add empty comments inside like <div id="adiv"><!-- --></div>. I dont understand why this is happening and is there a better to solve this issue?
this <div id=adiv></div> will in JSPX somehow be translated into <div id=adiv /> .
Share
That’s by JSP specification:
In theory, it should not harm if you use a XHTML doctype to present the document in the client side instead of a HTML doctype. However, even the XHTML spec requires some elements to be not self-closing. Another workaround would be using
<jsp:text />instead of a comment.JSP(X) is however an old view technology. Its successor, Facelets, does a better job in this.
See also: