Retrieving Form Data with a JSP

Now we need to process the data sent from the CreateForm.jsp. To do this we are going to create a bean that has properties that match the tag/value pairs sent in the request. Listing 12.2 contains the source for our Company bean.

Code Listing 12.2. Company.java
 /** This bean is used to encapsulate simple * company data. **/ public class Company { private String company = null; private String street = null; private String city = null; private String state = null; private String zip = null; // Default Constructor public Company() { } // Public Accessors public String getCompany() { return company; } public void setCompany(String value) { company = value; } public String getStreet() { return street; } public void ...

Get Pure Java Server Pages™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.