Pessoal, tô com um probleminha.
Tô tentando capturar uma string digitada na tela da minha JSP e jogar pra mesma tela. Como faço?
Segue meu código:
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Página JSP - Oi Mundo!</h1>
<br/>
<%= String nome = request.getParameter("Nome");
if (nome != null)
{
%>
<hl>
Oi <%= nome %>, <br />
Bem vindo(a)!
</hl>
<%=
}
else
{%>
<form action="welcome.jsp" method="get">
<p>Digite seu nome: </p>
<p><input type="text" name="Nome" />
<input type="submit" value="Submit" />
</p>
</form>
<%= }
%>
</body>
</html>
