Vous êtes sur la page 1sur 2

Estudar para prova:

criar pagina jsp para cadastro e outra para receber os dados:


cadastro.jsp:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or
g/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Cadastro do Cliente</title>
</head>
<body>
<form name="cadastro" action="salvar.jsp" method="post">
<fieldset>
<legend>Cadastro de Contatos</legend>
<label for="id">Id</label>
<input type="text" name="id" id="id"/><br/>
<label for="nome">Nome</label>
<input type="text" name="nome" id="nome"/><br/>
<label for="fone">Telefone</label>
<input type="text" name="fone" id="fone"/><br/>
<label for="endereco">Endereco</label>
<input type="text" name="endereco" id="endereco"/><br/>
</fieldset>
<input type="submit" value="enviar"/>
</form>
</body>
</html>
--------------------------------
salvar.jsp:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or
g/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Resultado</title>
</head>
<body>
<p><label>id:</label>${param['id']}</p>
<p><label>Nome:</label>${param['nome']}</p>
<p><label>Telefone:</label>${param['fone']}</p>
<p><label>Endereco:</label>${param['endereco']}</p>
</body>
</html>
---------------------------
contedo av2:
servlet, jsp com conexo ao banco de dados.