How to write a while loop in a JSP page?

JSPJava 8Object Oriented ProgrammingProgramming

Following is the while loop example −

<%! int fontSize; %>
      <title>WHILE LOOP Example</title>
      <%while ( fontSize <= 3){ %>
         <font color = "green" size = "<%= fontSize %>">
            JSP Tutorial
         </font><br />

The above code will generate the following result −

JSP Tutorial
JSP Tutorial
JSP Tutorial
Published on 20-Mar-2019 11:20:31