package org.wyona.yanel.impl.resources.contactform;

import javax.servlet.http.HttpServletRequest;

public class ContactBean {
    String company, lastName, firstName, address, city, email;
    public String message;
    
    public String getAddress() {
        return address;
    }
    public String getEmail() {
        return email;
    }
    public String getCompany() {
        return company;
    }
    public String getMessage() {
        return message;
    }
    public String getFirstName() {
        return firstName;
    }
    public String getCity() {
        return city;
    }
    public String getLastName() {
        return lastName;
    }
    public ContactBean(HttpServletRequest request) {
        company = request.getParameter("company");
        firstName = request.getParameter("firstName");
        lastName = request.getParameter("lastName");
        address  = request.getParameter("address");
        city  = request.getParameter("zipCity");
        email  = request.getParameter("email");
        message = request.getParameter("message");
    }
}

package org.wyona.yanel.impl.resources.contactform;

import javax.servlet.http.HttpServletRequest;

/**
 * Bean containing contact information
 */
public class ContactBean {
    private String company, lastName, firstName, address, city, email, message;
    
    public String getAddress() {
        return address;
    }
    public String getEmail() {
        return email;
    }
    public String getCompany() {
        return company;
    }
    public String getMessage() {
        return message;
    }
    public String getFirstName() {
        return firstName;
    }
    public String getCity() {
        return city;
    }
    public String getLastName() {
        return lastName;
    }
    public ContactBean(HttpServletRequest request) {
        company = request.getParameter("company");
        firstName = request.getParameter("firstName");
        lastName = request.getParameter("lastName");
        address  = request.getParameter("address");
        city  = request.getParameter("zipCity");
        email  = request.getParameter("email");
        message = request.getParameter("message");
    }
}

revert change of making message variable public in order to enforce using getMessage method