Are JSP expressions expressed inside HTML comments on a JSP page?

Are JSP expressions expressed inside HTML comments on a JSP page?

ie What will the server output in this case?

<!--
Jeremy <%="Flowers"%>
--> 

Will the expression be allowed or will remain in the expression in the HTML comment

and)

<!--

Jeremy <%="Flowers"%>

-->

or b)

<!--

Jeremy Flowers

-->
+5
source share
2 answers

Yes, expressions will be allowed. A JSP page does not even know that it is written in HTML format, so it does not interpret anything specific to HTML.

You can also write plain text using JSP or JSON or whatever.

+4
source

These are html comments, not jsp comments. Thus, all jsp codes inside are still evaluated.

jsp: <%-– ... -–%>. . , html.

+1

All Articles