- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- 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
Advertisements