Cadastro de cliente retornando null Java/JSP
Tudo bem pessoal. Estou tentando fazer um projeto de cadastro de cliente básico, para iniciar queria testar se os dados digitados estão sendo capturados. Porém quando se coloca as informações no formulário(navegador) e clica em cadastrar o valor que é retornado(navegador) é null. Já olhei várias vezes mas não acho o erro.
’’’
<!DOCTYPE html>
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<form action="form.jsp" method="POST">
<p>Cadastro De Clientes</p>
<p>Nome:<input type="text" name="txtNome"></p>
<p>Telefone: <input name="txtTel"></p>
<p>Email:<input type="text" name="txtEmail"></p>
<p>Renda:<input name="txtRend"></p>
<p>CPF:<input name="txtCpf"></p>
<p><input type="submit"></p>
</form>
</body>
</html>
<%@page import=“modelo.Cliente”%>
<%@page contentType=“text/html” pageEncoding=“UTF-8”%>
<%
Cliente c = new Cliente();
String nome = request.getParameter("txtNome");
int telefone = Integer.parseInt(request.getParameter("txtTel"));
String email = request.getParameter("txtEmail");
float renda = Float.parseFloat(request.getParameter("txtRend"));
int cpf = Integer.parseInt(request.getParameter("txtCpf"));
c.getNome();
c.getTelefone();
c.getCpf();
c.getEmail();
c.getRenda();
out.print(" NOME: " + c.getNome() + "-- CPF:" + c.getCpf() + "-- Email: " + c.getEmail() + "-- Telefone: " + c.getTelefone() + "-- Renda" + c.getRenda());
%>
</body>
- Document :
- Created on : 07/09/2017, 20:09:18
- Author : Henrique
*/
package modelo;
/**
*
-
@author Henrique
*/
public class Cliente {/**
-
@return the nome
*/
public String getNome() {
return nome;
}
/**
-
@param nome the nome to set
*/
public void setNome(String nome) {
this.nome = nome;
}
/**
-
@return the telefone
*/
public int getTelefone() {
return telefone;
}
/**
-
@param telefone the telefone to set
*/
public void setTelefone(int telefone) {
this.telefone = telefone;
}
/**
-
@return the email
*/
public String getEmail() {
return email;
}
/**
-
@param email the email to set
*/
public void setEmail(String email) {
this.email = email;
}
/**
-
@return the renda
*/
public float getRenda() {
return renda;
}
/**
-
@param renda the renda to set
*/
public void setRenda(float renda) {
this.renda = renda;
}
/**
-
@return the cpf
*/
public int getCpf() {
return cpf;
}
/**
-
@param cpf the cpf to set
*/
public void setCpf(int cpf) {
this.cpf = cpf;
}
private String nome;
private int telefone;
private String email;
private float renda;
private int cpf;
}
’’’ -
@return the nome