Define servlet. Differentiate servlet with JSP. Write a simple JSP file to display 'IOST' 20 times.
A servlet is a small java program that executes on the server-side of web connection and dynamically extends the functionality of a web server.Servlet technology is used to create Dynamic web application.
Program
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/htm; charset=UTF-8">
<title> JSP program to display "IOST" 20 times</title>
</head>
<body>
<h1> Displaying "IOST" 20 times!!</h1>
<table>
<%
for(int i=1; i<=20; i++){
%>
<tr><td>IOST </td></tr>
<%} %>
</table>
</body>
</html>
Comments
Post a Comment