Question
1) The first page will be the Registration JSF page.
The page should contains the drop-down menu with at least dour different salutation.
Validate user input eliminating the empty fields (use JSF validators for the textfields only).
Store the input data in a JavaBean and share the bean via session object. On the click event of the “register” button the page should redirect processing to the RegResult Java Server Page (not a JSF page).
2) The Confirmation JSP should retrieve the data from the bean and generate the table displaying the registration results (this page should be implemented in the JSP technology, not JSF).
In the Confirmation page include the link to navigate to the Registration page.
Extra: allow registration of up to 5 users.
Solution Preview
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.
public class store {// Vector<user> data = new Vector<>(5);
private ArrayList<user> data = new ArrayList<user>();
/**
* Creates a new instance of store
*/
public store() {
// data.clear();
}
public String addData(user users) {
user u = new user();
// u = users;
u.setAge(users.getAge());
u.setEmail(users.getEmail());
u.setFirstName(users.getFirstName());
u.setLastName(users.getLastName());
u.setSalut(users.getSalut());
data.add(u);
// data.add(users);
return "index.xhtml";
}...