Quantcast
Channel: User Federico klez Culloca - Stack Overflow
Viewing all articles
Browse latest Browse all 516

Answer by Federico klez Culloca for Problems with cli.get() and getting attributes in JSP and Servlet

$
0
0

The Cliente class is empty (apart from an empty constructor that does nothing by itself if you don't tell it what to do). You have to define both the data it contains and the methods to get the data. Something like this:

public class Cliente {    // the data in the class    String dni;    String nombre;    String apellido;    String telefono;    // manually set all members here    public Cliente(String dni, String nombre, String apellido, String telefono) {        this.dni = dni;        this.nombre = nombre;        this.apellido = apellido;        this.telefono = telefono;    }    // getter methods are not created automatically, you have to define them    public String getDni() { return dni; }    public String getNombre() { return nombre; }    public String getApellido() { return apellido; }    public String getTelefono() { return telefono; }}

Viewing all articles
Browse latest Browse all 516

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>