Tabelline in JSP

index.jsp

<%-- 
 Document : index
 Created on : 12-gen-2015, 11.24.08
 Author : GfO
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>Tabelline per bambini/e</title>
 </head>
 <body>
 <h1>Tabelline per bambini/e</h1>
 <p>Caro bambino/a, inserisci la base della tabellina che vuoi vedere...</p>
 <form action="tabellina.jsp" method="get">
 Base <input type="text" name="base" />
 <input type="submit" value="OK" />
 </form>
 </body>
</html>

tabellina.jsp

 <%-- 
 Document : tabellina
 Created on : 12-gen-2015, 11.50.00
 Author : GfO
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>Tabelline per bambini/e</title>
 </head>
 <body>
 <h1>Tabellina del <% int b = Integer.parseInt(request.getParameter("base"));%> <%=b%></h1>
 <% for (int i = 1; i <= 10; i++) {%>
 <p><%=b%> x <%=i%> = <%=b * i%></p>
 <% }%>
 </body>
</html>