<%--
Document : index
Created on : 03-oct-2013, 8:43:18
Author : Laboratorio 2
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Ejemplo de formulario</title>
</head>
<body bgcolor="#ffffcc">
<!--If de contra -->
<% if (request.getParameter("nombre")== null && request.getParameter("correo")== null ){%>
<center>
<h2>Tu Informacion</h2>
<!--Se crea un formulario -->
<FORM METHOD="GET" ACTION="pagina2.jsp">
Tu nombre: <input type="text" name="nombre" size=26>
Tu correo: <input type="text" name="correo" size=26>
<!--Boton -->
<input type="submit" value="Process">
</FORM>
</center>
<% } else {%>
<%! String nombre,correo; %>
<%
nombre=request.getParameter("nombre");
correo=request.getParameter("correo");
%>
<b>Esto son tus datos</b>:
<b>nombre</b>: <%= nombre %><p>
<b>correo</b>: <%= correo %>
<% } %>
</body>
</html>
IMAGENES:
No hay comentarios:
Publicar un comentario