<%! int registro = 1; int consultas = 0; %> JavaBeans <% consultas++; Integer iRegistro = (Integer) session.getValue("registro"); if (iRegistro != null) { registro = iRegistro.intValue(); String opcion = request.getParameter("opcion"); if (opcion != null) registro += opcion.equals("Siguiente") ? 1 : -1; } if (registro < 1) registro = 1; frijol.ubicarRegistro(registro); %>

Paises de América

País <%= frijol.getPais() %>
Capital <%= frijol.getCapital() %>
Continente <%= frijol.getContinente() %>
Area <%= frijol.getArea() %>
Población <%= frijol.getPoblacion() %>
Consultas: <%= consultas %>
Registro # <%= frijol.getRegistro() %>
<% registro = frijol.getRegistro(); session.putAttribute("registro", new Integer(registro)); %>