- 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 for loop in a JSP page?
Following is the for loop example −
<%! int fontSize; %> <html> <head> <title>FOR LOOP Example</title> </head> <body> <%for ( fontSize = 1; fontSize <= 3; fontSize++){ %> <font color = "green" size = "<%= fontSize %>"> JSP Tutorial </font><br /> <%}%> </body> </html>
The above code will generate the following result −
JSP Tutorial JSP Tutorial JSP Tutorial
- Related Articles
- How to write a while 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 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 print current date and time in a JSP page?
- What is a page object in JSP?
- What is a page directive in JSP?
- How a JSP page works. Can somebody explains the JSP architecture in simpler terms
- How to send a simple text based email using a JSP page?
- How to avoid Java code in jsp page?

Advertisements