Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

What does jsp comment do in a jsp page?


Asked by Rhett York on Dec 06, 2021 JSP



JSP comment is to document the code. In addition, JSP comment is used to note some parts of JSP page to make it clearer and easier to maintain. The following illustrates JSP comment inside a JSP page: JSP comment is stripped off from the page in the response to the web browser.
Indeed,
There are 3 types of comments we can use in JSP page: Java comment (which can used inside scriplets) To see the source code of java class translated by container of JSP page:
In fact, Last modified on October 11th, 2014 by Joe. There is only one type of JSP comment available by JSP specification. This JSP comment tag tells the JSP container to ignore the comment part from compilation. That is, the commented part of source code is not considered for the content parsed for ‘response’. Is this a JSP Comment?
Moreover,
JSP Expression :- It evaluates and convert the expression to a string. Syntax:- <%= expression %> Example:- <% num1 = num1+num2 %> JAVA Comments :- It contains the text that is added for information which has to be ignored. Syntax:- <% -- JSP Comments %>
Keeping this in consideration,
It is a Web based technology helps us to create dynamic and platform independent web pages. In this, Java code can be inserted in HTML/ XML pages or both. JSP is first converted into servlet by JSP container before processing the client’s request. They are easy to maintain.