<%@ 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.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>DAWJ - AppWebSaudacao</title>
</head>
<body>
<h1> AppWebSaudacao</h1>
<p>Informe seu nome e sobrenome e, em seguida, clique em <b>Enviar</b>.</p>
action="saudacao.jsp"
method="post
<form action="saudacao.jsp" method="post">
<table>
<tr>
<td>Nome</td>
<td>input type="text" name="nome"</td>
</tr>
<tr>
<td>Sobrenome</td>
<td>input type="text" name="sobrenome"</td>
</tr>
<tr>
<td colspan="2"><input type = "submit" value = "Enviar"></td>
</tr>
</table>
</form>
</body>
</html>
o código jsp é o seguinte:
<%@ 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.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>DAWJ - AppWebSaudacao</title>
</head>
<body>
<%
//tags <% delimitam um scriptlet
String nome = request.getParameter("nome");
String sobrenome = request.getParameter("sobrenome");
String nomecompleto = nome + " " + sobrenome;
%>
<h1> AppWebSaudacao</h1>
01á, <%=nomecompleto%>!
<form action="index.jsp" method="get"> <input type="submit" value="Voltar">
</form>
</body>
</html>
já minha tela de execução tanto dentro do eclipse como utilizando o browser, é essa:
AppWebSaudacao
Informe seu nome e sobrenome e, em seguida, clique em Enviar.
action="saudacao.jsp" method="post
Nome input type="text" name="nome"
Sobrenome input type="text" name="sobrenome"
"BOTÃO ENVIAR"
Alguém poderia me ajudar a descobrir o q está acontecendo?
Alguém sabe porque não aparece a tabela, mas sim o action, etc...
Estou realizando essa primeira aplicação utilizando eclipse, tomcat 6 num macbook.
Sds,