Can I include JSP expressions in <!-- --> style comments?

John Zukowski

Sure. You can include code like:

  Loaded: <%= new Date() %>
in your code with no problems. Of course, only those who view the source will see the generated output, but it will be generated as requested.

It doesn't make sense to try to put code in <%-- --%> style comment as these comments are only visible in the preprocessed JSP source files.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact