- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to write a while loop in a JSP page?
Following is the while loop example −
<%! int fontSize; %> <html> <head> <title>WHILE LOOP Example</title> </head> <body> <%while ( fontSize <= 3){ %> <font color = "green" size = "<%= fontSize %>"> JSP Tutorial </font><br /> <%fontSize++;%> <%}%> </body> </html>
The above code will generate the following result −
JSP Tutorial JSP Tutorial JSP Tutorial
- Related Articles
- How to write a for loop in a JSP page?
- How to write a comment in a JSP page?
- How to write a switch statement in a JSP page?
- How to write an if-else statement in a JSP page?
- How to convert a Python for loop to while loop?
- How can I write in order with for loop or while loop?
- How to create a common error page using JSP?
- How to refresh a JSP page at regular interval?
- How to write a JSP Expression?
- How to send a html based email using a JSP page?
- How to send a email with attachment using a JSP page?
- How to emulate a do-while loop in Python?
- How to print current date and time in a JSP page?
- What is a page object in JSP?
- What is a page directive in JSP?

Advertisements