top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are different types of comments in JSP?

0 votes
627 views
What are different types of comments in JSP?
posted Aug 21, 2017 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

JSP pages provide two types of comments that we can use:

HTML Comments: Since JSP pages are like HTML, we can use HTML comments like <-- HTML Comment -->. These comments are sent to client also and we can see it in HTML source. So we should avoid any code level comments or debugging comments using HTML comments.
JSP Comments: JSP Comments are written using scriptlets like <%-- JSP Comment --%>. These comments are present in the generated servlet source code and doesn’t sent to client. For any code level or debugging information comments we should use JSP comments.

answer Aug 22, 2017 by Kumar Neeraj
...